|
@@ -129,7 +129,7 @@ public interface ClientProtocol {
|
|
* @throws IOException If an I/O error occurred
|
|
* @throws IOException If an I/O error occurred
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly(atimeAffected = true)
|
|
|
|
|
|
+ @ReadOnly(atimeAffected = true, isCoordinated = true)
|
|
LocatedBlocks getBlockLocations(String src, long offset, long length)
|
|
LocatedBlocks getBlockLocations(String src, long offset, long length)
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -139,7 +139,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
FsServerDefaults getServerDefaults() throws IOException;
|
|
FsServerDefaults getServerDefaults() throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -280,7 +280,7 @@ public interface ClientProtocol {
|
|
* @return All the in-use block storage policies currently.
|
|
* @return All the in-use block storage policies currently.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
BlockStoragePolicy[] getStoragePolicies() throws IOException;
|
|
BlockStoragePolicy[] getStoragePolicies() throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -323,7 +323,7 @@ public interface ClientProtocol {
|
|
* If file/dir <code>src</code> is not found
|
|
* If file/dir <code>src</code> is not found
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
BlockStoragePolicy getStoragePolicy(String path) throws IOException;
|
|
BlockStoragePolicy getStoragePolicy(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -690,7 +690,7 @@ public interface ClientProtocol {
|
|
* @throws IOException If an I/O error occurred
|
|
* @throws IOException If an I/O error occurred
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
DirectoryListing getListing(String src, byte[] startAfter,
|
|
DirectoryListing getListing(String src, byte[] startAfter,
|
|
boolean needLocation) throws IOException;
|
|
boolean needLocation) throws IOException;
|
|
|
|
|
|
@@ -701,7 +701,7 @@ public interface ClientProtocol {
|
|
* @throws IOException If an I/O error occurred
|
|
* @throws IOException If an I/O error occurred
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
SnapshottableDirectoryStatus[] getSnapshottableDirListing()
|
|
SnapshottableDirectoryStatus[] getSnapshottableDirListing()
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -829,7 +829,7 @@ public interface ClientProtocol {
|
|
* a symlink.
|
|
* a symlink.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
long getPreferredBlockSize(String filename)
|
|
long getPreferredBlockSize(String filename)
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -984,7 +984,7 @@ public interface ClientProtocol {
|
|
* cookie returned from the previous call.
|
|
* cookie returned from the previous call.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
|
CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -1020,7 +1020,7 @@ public interface ClientProtocol {
|
|
* @throws IOException If an I/O error occurred
|
|
* @throws IOException If an I/O error occurred
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
HdfsFileStatus getFileInfo(String src) throws IOException;
|
|
HdfsFileStatus getFileInfo(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1035,7 +1035,7 @@ public interface ClientProtocol {
|
|
* @throws IOException If an I/O error occurred
|
|
* @throws IOException If an I/O error occurred
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
boolean isFileClosed(String src) throws IOException;
|
|
boolean isFileClosed(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1052,7 +1052,7 @@ public interface ClientProtocol {
|
|
* @throws IOException If an I/O error occurred
|
|
* @throws IOException If an I/O error occurred
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
HdfsFileStatus getFileLinkInfo(String src) throws IOException;
|
|
HdfsFileStatus getFileLinkInfo(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1067,7 +1067,7 @@ public interface ClientProtocol {
|
|
* @throws IOException If an I/O error occurred
|
|
* @throws IOException If an I/O error occurred
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
HdfsLocatedFileStatus getLocatedFileInfo(String src, boolean needBlockToken)
|
|
HdfsLocatedFileStatus getLocatedFileInfo(String src, boolean needBlockToken)
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -1082,7 +1082,7 @@ public interface ClientProtocol {
|
|
* @throws IOException If an I/O error occurred
|
|
* @throws IOException If an I/O error occurred
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
ContentSummary getContentSummary(String path) throws IOException;
|
|
ContentSummary getContentSummary(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1195,7 +1195,7 @@ public interface ClientProtocol {
|
|
* or an I/O error occurred
|
|
* or an I/O error occurred
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
String getLinkTarget(String path) throws IOException;
|
|
String getLinkTarget(String path) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1265,7 +1265,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
DataEncryptionKey getDataEncryptionKey() throws IOException;
|
|
DataEncryptionKey getDataEncryptionKey() throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1334,7 +1334,7 @@ public interface ClientProtocol {
|
|
* @throws IOException on error
|
|
* @throws IOException on error
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot,
|
|
SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot,
|
|
String fromSnapshot, String toSnapshot) throws IOException;
|
|
String fromSnapshot, String toSnapshot) throws IOException;
|
|
|
|
|
|
@@ -1362,7 +1362,7 @@ public interface ClientProtocol {
|
|
* @throws IOException on error
|
|
* @throws IOException on error
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
SnapshotDiffReportListing getSnapshotDiffReportListing(String snapshotRoot,
|
|
SnapshotDiffReportListing getSnapshotDiffReportListing(String snapshotRoot,
|
|
String fromSnapshot, String toSnapshot, byte[] startPath, int index)
|
|
String fromSnapshot, String toSnapshot, byte[] startPath, int index)
|
|
throws IOException;
|
|
throws IOException;
|
|
@@ -1409,7 +1409,7 @@ public interface ClientProtocol {
|
|
* @return A batch of CacheDirectiveEntry objects.
|
|
* @return A batch of CacheDirectiveEntry objects.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
|
BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
|
long prevId, CacheDirectiveInfo filter) throws IOException;
|
|
long prevId, CacheDirectiveInfo filter) throws IOException;
|
|
|
|
|
|
@@ -1451,7 +1451,7 @@ public interface ClientProtocol {
|
|
* @return A batch of CachePoolEntry objects.
|
|
* @return A batch of CachePoolEntry objects.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
BatchedEntries<CachePoolEntry> listCachePools(String prevPool)
|
|
BatchedEntries<CachePoolEntry> listCachePools(String prevPool)
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -1498,7 +1498,7 @@ public interface ClientProtocol {
|
|
* Gets the ACLs of files and directories.
|
|
* Gets the ACLs of files and directories.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
AclStatus getAclStatus(String src) throws IOException;
|
|
AclStatus getAclStatus(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1512,7 +1512,7 @@ public interface ClientProtocol {
|
|
* Get the encryption zone for a path.
|
|
* Get the encryption zone for a path.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
EncryptionZone getEZForPath(String src)
|
|
EncryptionZone getEZForPath(String src)
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -1524,7 +1524,7 @@ public interface ClientProtocol {
|
|
* @return Batch of encryption zones.
|
|
* @return Batch of encryption zones.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
BatchedEntries<EncryptionZone> listEncryptionZones(
|
|
BatchedEntries<EncryptionZone> listEncryptionZones(
|
|
long prevId) throws IOException;
|
|
long prevId) throws IOException;
|
|
|
|
|
|
@@ -1549,7 +1549,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
BatchedEntries<ZoneReencryptionStatus> listReencryptionStatus(long prevId)
|
|
BatchedEntries<ZoneReencryptionStatus> listReencryptionStatus(long prevId)
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -1583,7 +1583,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
List<XAttr> getXAttrs(String src, List<XAttr> xAttrs)
|
|
List<XAttr> getXAttrs(String src, List<XAttr> xAttrs)
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -1599,7 +1599,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
List<XAttr> listXAttrs(String src)
|
|
List<XAttr> listXAttrs(String src)
|
|
throws IOException;
|
|
throws IOException;
|
|
|
|
|
|
@@ -1634,7 +1634,7 @@ public interface ClientProtocol {
|
|
* @throws IOException see specific implementation
|
|
* @throws IOException see specific implementation
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly // TODO : after HDFS-13749 is done, change to coordinated call
|
|
void checkAccess(String path, FsAction mode) throws IOException;
|
|
void checkAccess(String path, FsAction mode) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1643,7 +1643,7 @@ public interface ClientProtocol {
|
|
* the starting point for the inotify event stream.
|
|
* the starting point for the inotify event stream.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
long getCurrentEditLogTxid() throws IOException;
|
|
long getCurrentEditLogTxid() throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1651,7 +1651,7 @@ public interface ClientProtocol {
|
|
* transactions for txids equal to or greater than txid.
|
|
* transactions for txids equal to or greater than txid.
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
EventBatchList getEditsFromTxid(long txid) throws IOException;
|
|
EventBatchList getEditsFromTxid(long txid) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1709,7 +1709,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
ErasureCodingPolicyInfo[] getErasureCodingPolicies() throws IOException;
|
|
ErasureCodingPolicyInfo[] getErasureCodingPolicies() throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1718,7 +1718,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
Map<String, String> getErasureCodingCodecs() throws IOException;
|
|
Map<String, String> getErasureCodingCodecs() throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1729,7 +1729,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
ErasureCodingPolicy getErasureCodingPolicy(String src) throws IOException;
|
|
ErasureCodingPolicy getErasureCodingPolicy(String src) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1769,7 +1769,7 @@ public interface ClientProtocol {
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
@Deprecated
|
|
@Deprecated
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
BatchedEntries<OpenFileEntry> listOpenFiles(long prevId) throws IOException;
|
|
BatchedEntries<OpenFileEntry> listOpenFiles(long prevId) throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1784,7 +1784,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
BatchedEntries<OpenFileEntry> listOpenFiles(long prevId,
|
|
BatchedEntries<OpenFileEntry> listOpenFiles(long prevId,
|
|
EnumSet<OpenFilesType> openFilesTypes, String path) throws IOException;
|
|
EnumSet<OpenFilesType> openFilesTypes, String path) throws IOException;
|
|
|
|
|
|
@@ -1796,7 +1796,7 @@ public interface ClientProtocol {
|
|
* @throws IOException
|
|
* @throws IOException
|
|
*/
|
|
*/
|
|
@Idempotent
|
|
@Idempotent
|
|
- @ReadOnly
|
|
|
|
|
|
+ @ReadOnly(isCoordinated = true)
|
|
void msync() throws IOException;
|
|
void msync() throws IOException;
|
|
|
|
|
|
/**
|
|
/**
|