|
@@ -129,7 +129,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;
|
|
|
|
|
@@ -139,7 +139,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
FsServerDefaults getServerDefaults() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -280,7 +280,7 @@ public interface ClientProtocol {
|
|
|
* @return All the in-use block storage policies currently.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BlockStoragePolicy[] getStoragePolicies() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -323,7 +323,7 @@ public interface ClientProtocol {
|
|
|
* If file/dir <code>src</code> is not found
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BlockStoragePolicy getStoragePolicy(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -690,7 +690,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;
|
|
|
|
|
@@ -702,7 +702,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
SnapshottableDirectoryStatus[] getSnapshottableDirListing()
|
|
|
throws IOException;
|
|
|
|
|
@@ -830,7 +830,7 @@ public interface ClientProtocol {
|
|
|
* a symlink.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
long getPreferredBlockSize(String filename)
|
|
|
throws IOException;
|
|
|
|
|
@@ -975,7 +975,7 @@ public interface ClientProtocol {
|
|
|
* cookie returned from the previous call.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1011,7 +1011,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
HdfsFileStatus getFileInfo(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1026,7 +1026,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
boolean isFileClosed(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1043,7 +1043,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
HdfsFileStatus getFileLinkInfo(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1057,7 +1057,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
ContentSummary getContentSummary(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1170,7 +1170,7 @@ public interface ClientProtocol {
|
|
|
* or an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
String getLinkTarget(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1241,7 +1241,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
DataEncryptionKey getDataEncryptionKey() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1310,7 +1310,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException on error
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot,
|
|
|
String fromSnapshot, String toSnapshot) throws IOException;
|
|
|
|
|
@@ -1356,7 +1356,7 @@ public interface ClientProtocol {
|
|
|
* @return A batch of CacheDirectiveEntry objects.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
|
|
long prevId, CacheDirectiveInfo filter) throws IOException;
|
|
|
|
|
@@ -1398,7 +1398,7 @@ public interface ClientProtocol {
|
|
|
* @return A batch of CachePoolEntry objects.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<CachePoolEntry> listCachePools(String prevPool)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1445,7 +1445,7 @@ public interface ClientProtocol {
|
|
|
* Gets the ACLs of files and directories.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
AclStatus getAclStatus(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1459,7 +1459,7 @@ public interface ClientProtocol {
|
|
|
* Get the encryption zone for a path.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
EncryptionZone getEZForPath(String src)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1471,7 +1471,7 @@ public interface ClientProtocol {
|
|
|
* @return Batch of encryption zones.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<EncryptionZone> listEncryptionZones(
|
|
|
long prevId) throws IOException;
|
|
|
|
|
@@ -1496,7 +1496,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<ZoneReencryptionStatus> listReencryptionStatus(long prevId)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1530,7 +1530,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
List<XAttr> getXAttrs(String src, List<XAttr> xAttrs)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1546,7 +1546,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
List<XAttr> listXAttrs(String src)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1581,7 +1581,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;
|
|
|
|
|
|
/**
|
|
@@ -1590,7 +1590,7 @@ public interface ClientProtocol {
|
|
|
* the starting point for the inotify event stream.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
long getCurrentEditLogTxid() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1598,7 +1598,7 @@ public interface ClientProtocol {
|
|
|
* transactions for txids equal to or greater than txid.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
EventBatchList getEditsFromTxid(long txid) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1656,7 +1656,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
ErasureCodingPolicyInfo[] getErasureCodingPolicies() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1665,7 +1665,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
Map<String, String> getErasureCodingCodecs() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1676,7 +1676,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
ErasureCodingPolicy getErasureCodingPolicy(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1716,7 +1716,7 @@ public interface ClientProtocol {
|
|
|
*/
|
|
|
@Idempotent
|
|
|
@Deprecated
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<OpenFileEntry> listOpenFiles(long prevId) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1731,7 +1731,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<OpenFileEntry> listOpenFiles(long prevId,
|
|
|
EnumSet<OpenFilesType> openFilesTypes, String path) throws IOException;
|
|
|
|
|
@@ -1743,6 +1743,6 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
void msync() throws IOException;
|
|
|
}
|