|
@@ -126,7 +126,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly(atimeAffected = true)
|
|
|
+ @ReadOnly(atimeAffected = true, isCoordinated = true)
|
|
|
LocatedBlocks getBlockLocations(String src, long offset, long length)
|
|
|
throws IOException;
|
|
|
|
|
@@ -136,7 +136,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
FsServerDefaults getServerDefaults() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -269,7 +269,7 @@ public interface ClientProtocol {
|
|
|
* @return All the in-use block storage policies currently.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BlockStoragePolicy[] getStoragePolicies() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -312,7 +312,7 @@ public interface ClientProtocol {
|
|
|
* If file/dir <code>src</code> is not found
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BlockStoragePolicy getStoragePolicy(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -679,7 +679,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
DirectoryListing getListing(String src, byte[] startAfter,
|
|
|
boolean needLocation) throws IOException;
|
|
|
|
|
@@ -690,7 +690,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
SnapshottableDirectoryStatus[] getSnapshottableDirListing()
|
|
|
throws IOException;
|
|
|
|
|
@@ -793,7 +793,7 @@ public interface ClientProtocol {
|
|
|
* a symlink.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
long getPreferredBlockSize(String filename)
|
|
|
throws IOException;
|
|
|
|
|
@@ -933,7 +933,7 @@ public interface ClientProtocol {
|
|
|
* cookie returned from the previous call.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
|
|
throws IOException;
|
|
|
|
|
@@ -969,7 +969,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
HdfsFileStatus getFileInfo(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -984,7 +984,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
boolean isFileClosed(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1001,7 +1001,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
HdfsFileStatus getFileLinkInfo(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1015,7 +1015,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
ContentSummary getContentSummary(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1128,7 +1128,7 @@ public interface ClientProtocol {
|
|
|
* or an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
String getLinkTarget(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1199,7 +1199,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
DataEncryptionKey getDataEncryptionKey() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1268,7 +1268,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException on error
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot,
|
|
|
String fromSnapshot, String toSnapshot) throws IOException;
|
|
|
|
|
@@ -1314,7 +1314,7 @@ public interface ClientProtocol {
|
|
|
* @return A batch of CacheDirectiveEntry objects.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
|
|
long prevId, CacheDirectiveInfo filter) throws IOException;
|
|
|
|
|
@@ -1356,7 +1356,7 @@ public interface ClientProtocol {
|
|
|
* @return A batch of CachePoolEntry objects.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<CachePoolEntry> listCachePools(String prevPool)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1403,7 +1403,7 @@ public interface ClientProtocol {
|
|
|
* Gets the ACLs of files and directories.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
AclStatus getAclStatus(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1417,7 +1417,7 @@ public interface ClientProtocol {
|
|
|
* Get the encryption zone for a path.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
EncryptionZone getEZForPath(String src)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1429,7 +1429,7 @@ public interface ClientProtocol {
|
|
|
* @return Batch of encryption zones.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<EncryptionZone> listEncryptionZones(
|
|
|
long prevId) throws IOException;
|
|
|
|
|
@@ -1463,7 +1463,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
List<XAttr> getXAttrs(String src, List<XAttr> xAttrs)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1479,7 +1479,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
List<XAttr> listXAttrs(String src)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1514,7 +1514,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException see specific implementation
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly // TODO : after HDFS-13749 is done, change to coordinated call
|
|
|
void checkAccess(String path, FsAction mode) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1523,7 +1523,7 @@ public interface ClientProtocol {
|
|
|
* the starting point for the inotify event stream.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
long getCurrentEditLogTxid() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1531,7 +1531,7 @@ public interface ClientProtocol {
|
|
|
* transactions for txids equal to or greater than txid.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
EventBatchList getEditsFromTxid(long txid) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1563,7 +1563,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<OpenFileEntry> listOpenFiles(long prevId) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1574,6 +1574,6 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(activeOnly = true)
|
|
|
void msync() throws IOException;
|
|
|
}
|