|
@@ -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;
|
|
|
|
|
@@ -985,7 +985,7 @@ public interface ClientProtocol {
|
|
|
* cookie returned from the previous call.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1021,7 +1021,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
HdfsFileStatus getFileInfo(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1036,7 +1036,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
boolean isFileClosed(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1053,7 +1053,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
HdfsFileStatus getFileLinkInfo(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1068,7 +1068,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
HdfsLocatedFileStatus getLocatedFileInfo(String src, boolean needBlockToken)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1083,7 +1083,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException If an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
ContentSummary getContentSummary(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1196,7 +1196,7 @@ public interface ClientProtocol {
|
|
|
* or an I/O error occurred
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
String getLinkTarget(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1266,7 +1266,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
DataEncryptionKey getDataEncryptionKey() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1335,7 +1335,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException on error
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot,
|
|
|
String fromSnapshot, String toSnapshot) throws IOException;
|
|
|
|
|
@@ -1363,7 +1363,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException on error
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
SnapshotDiffReportListing getSnapshotDiffReportListing(String snapshotRoot,
|
|
|
String fromSnapshot, String toSnapshot, byte[] startPath, int index)
|
|
|
throws IOException;
|
|
@@ -1410,7 +1410,7 @@ public interface ClientProtocol {
|
|
|
* @return A batch of CacheDirectiveEntry objects.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
|
|
long prevId, CacheDirectiveInfo filter) throws IOException;
|
|
|
|
|
@@ -1452,7 +1452,7 @@ public interface ClientProtocol {
|
|
|
* @return A batch of CachePoolEntry objects.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<CachePoolEntry> listCachePools(String prevPool)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1499,7 +1499,7 @@ public interface ClientProtocol {
|
|
|
* Gets the ACLs of files and directories.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
AclStatus getAclStatus(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1513,7 +1513,7 @@ public interface ClientProtocol {
|
|
|
* Get the encryption zone for a path.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
EncryptionZone getEZForPath(String src)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1525,7 +1525,7 @@ public interface ClientProtocol {
|
|
|
* @return Batch of encryption zones.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<EncryptionZone> listEncryptionZones(
|
|
|
long prevId) throws IOException;
|
|
|
|
|
@@ -1550,7 +1550,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<ZoneReencryptionStatus> listReencryptionStatus(long prevId)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1584,7 +1584,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
List<XAttr> getXAttrs(String src, List<XAttr> xAttrs)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1600,7 +1600,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
List<XAttr> listXAttrs(String src)
|
|
|
throws IOException;
|
|
|
|
|
@@ -1635,7 +1635,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;
|
|
|
|
|
|
/**
|
|
@@ -1644,7 +1644,7 @@ public interface ClientProtocol {
|
|
|
* the starting point for the inotify event stream.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
long getCurrentEditLogTxid() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1652,7 +1652,7 @@ public interface ClientProtocol {
|
|
|
* transactions for txids equal to or greater than txid.
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
EventBatchList getEditsFromTxid(long txid) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1710,7 +1710,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
ErasureCodingPolicyInfo[] getErasureCodingPolicies() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1719,7 +1719,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
Map<String, String> getErasureCodingCodecs() throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1730,7 +1730,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
ErasureCodingPolicy getErasureCodingPolicy(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1770,7 +1770,7 @@ public interface ClientProtocol {
|
|
|
*/
|
|
|
@Idempotent
|
|
|
@Deprecated
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<OpenFileEntry> listOpenFiles(long prevId) throws IOException;
|
|
|
|
|
|
/**
|
|
@@ -1785,7 +1785,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
BatchedEntries<OpenFileEntry> listOpenFiles(long prevId,
|
|
|
EnumSet<OpenFilesType> openFilesTypes, String path) throws IOException;
|
|
|
|
|
@@ -1797,7 +1797,7 @@ public interface ClientProtocol {
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
@Idempotent
|
|
|
- @ReadOnly
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
|
void msync() throws IOException;
|
|
|
|
|
|
/**
|