HDFS-8620. Clean up the checkstyle warinings about ClientProtocol. Contributed by Takanobu Asanuma.
This commit is contained in:
parent
b68701b7b2
commit
c0b8e4e5b5
@ -39,7 +39,8 @@ public interface HdfsClientConfigKeys {
|
|||||||
String DFS_NAMENODE_HTTPS_ADDRESS_KEY = "dfs.namenode.https-address";
|
String DFS_NAMENODE_HTTPS_ADDRESS_KEY = "dfs.namenode.https-address";
|
||||||
String DFS_HA_NAMENODES_KEY_PREFIX = "dfs.ha.namenodes";
|
String DFS_HA_NAMENODES_KEY_PREFIX = "dfs.ha.namenodes";
|
||||||
int DFS_NAMENODE_RPC_PORT_DEFAULT = 8020;
|
int DFS_NAMENODE_RPC_PORT_DEFAULT = 8020;
|
||||||
String DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY = "dfs.namenode.kerberos.principal";
|
String DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY =
|
||||||
|
"dfs.namenode.kerberos.principal";
|
||||||
|
|
||||||
/** dfs.client.retry configuration properties */
|
/** dfs.client.retry configuration properties */
|
||||||
interface Retry {
|
interface Retry {
|
||||||
|
@ -96,13 +96,14 @@ public interface ClientProtocol {
|
|||||||
* 69L is the last version id when this class was used for protocols
|
* 69L is the last version id when this class was used for protocols
|
||||||
* serialization. DO not update this version any further.
|
* serialization. DO not update this version any further.
|
||||||
*/
|
*/
|
||||||
public static final long versionID = 69L;
|
long versionID = 69L;
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
// File contents
|
// File contents
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
* Get locations of the blocks of the specified file within the specified range.
|
* Get locations of the blocks of the specified file
|
||||||
|
* within the specified range.
|
||||||
* DataNode locations for each block are sorted by
|
* DataNode locations for each block are sorted by
|
||||||
* the proximity to the client.
|
* the proximity to the client.
|
||||||
* <p>
|
* <p>
|
||||||
@ -126,11 +127,8 @@ public interface ClientProtocol {
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public LocatedBlocks getBlockLocations(String src,
|
LocatedBlocks getBlockLocations(String src, long offset, long length)
|
||||||
long offset,
|
throws IOException;
|
||||||
long length)
|
|
||||||
throws AccessControlException, FileNotFoundException,
|
|
||||||
UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get server default values for a number of configuration params.
|
* Get server default values for a number of configuration params.
|
||||||
@ -138,7 +136,7 @@ public LocatedBlocks getBlockLocations(String src,
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public FsServerDefaults getServerDefaults() throws IOException;
|
FsServerDefaults getServerDefaults() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new file entry in the namespace.
|
* Create a new file entry in the namespace.
|
||||||
@ -148,8 +146,8 @@ public LocatedBlocks getBlockLocations(String src,
|
|||||||
* The name-node does not have a notion of "current" directory for a client.
|
* The name-node does not have a notion of "current" directory for a client.
|
||||||
* <p>
|
* <p>
|
||||||
* Once created, the file is visible and available for read to other clients.
|
* Once created, the file is visible and available for read to other clients.
|
||||||
* Although, other clients cannot {@link #delete(String, boolean)}, re-create or
|
* Although, other clients cannot {@link #delete(String, boolean)}, re-create
|
||||||
* {@link #rename(String, String)} it until the file is completed
|
* or {@link #rename(String, String)} it until the file is completed
|
||||||
* or explicitly as a result of lease expiration.
|
* or explicitly as a result of lease expiration.
|
||||||
* <p>
|
* <p>
|
||||||
* Blocks have a maximum size. Clients that intend to create
|
* Blocks have a maximum size. Clients that intend to create
|
||||||
@ -190,15 +188,11 @@ public LocatedBlocks getBlockLocations(String src,
|
|||||||
* <em>Note that create with {@link CreateFlag#OVERWRITE} is idempotent.</em>
|
* <em>Note that create with {@link CreateFlag#OVERWRITE} is idempotent.</em>
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public HdfsFileStatus create(String src, FsPermission masked,
|
HdfsFileStatus create(String src, FsPermission masked,
|
||||||
String clientName, EnumSetWritable<CreateFlag> flag,
|
String clientName, EnumSetWritable<CreateFlag> flag,
|
||||||
boolean createParent, short replication, long blockSize,
|
boolean createParent, short replication, long blockSize,
|
||||||
CryptoProtocolVersion[] supportedVersions)
|
CryptoProtocolVersion[] supportedVersions)
|
||||||
throws AccessControlException, AlreadyBeingCreatedException,
|
throws IOException;
|
||||||
DSQuotaExceededException, FileAlreadyExistsException,
|
|
||||||
FileNotFoundException, NSQuotaExceededException,
|
|
||||||
ParentNotDirectoryException, SafeModeException, UnresolvedLinkException,
|
|
||||||
SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append to the end of the file.
|
* Append to the end of the file.
|
||||||
@ -227,10 +221,8 @@ public HdfsFileStatus create(String src, FsPermission masked,
|
|||||||
* @throws UnsupportedOperationException if append is not supported
|
* @throws UnsupportedOperationException if append is not supported
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public LastBlockWithStatus append(String src, String clientName,
|
LastBlockWithStatus append(String src, String clientName,
|
||||||
EnumSetWritable<CreateFlag> flag) throws AccessControlException,
|
EnumSetWritable<CreateFlag> flag) throws IOException;
|
||||||
DSQuotaExceededException, FileNotFoundException, SafeModeException,
|
|
||||||
UnresolvedLinkException, SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set replication for an existing file.
|
* Set replication for an existing file.
|
||||||
@ -256,20 +248,18 @@ public LastBlockWithStatus append(String src, String clientName,
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public boolean setReplication(String src, short replication)
|
boolean setReplication(String src, short replication)
|
||||||
throws AccessControlException, DSQuotaExceededException,
|
throws IOException;
|
||||||
FileNotFoundException, SafeModeException, UnresolvedLinkException,
|
|
||||||
SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all the available block storage policies.
|
* Get all the available block storage policies.
|
||||||
* @return All the in-use block storage policies currently.
|
* @return All the in-use block storage policies currently.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public BlockStoragePolicy[] getStoragePolicies() throws IOException;
|
BlockStoragePolicy[] getStoragePolicies() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the storage policy for a file/directory
|
* Set the storage policy for a file/directory.
|
||||||
* @param src Path of an existing file/directory.
|
* @param src Path of an existing file/directory.
|
||||||
* @param policyName The name of the storage policy
|
* @param policyName The name of the storage policy
|
||||||
* @throws SnapshotAccessControlException If access is denied
|
* @throws SnapshotAccessControlException If access is denied
|
||||||
@ -278,9 +268,8 @@ public boolean setReplication(String src, short replication)
|
|||||||
* @throws QuotaExceededException If changes violate the quota restriction
|
* @throws QuotaExceededException If changes violate the quota restriction
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void setStoragePolicy(String src, String policyName)
|
void setStoragePolicy(String src, String policyName)
|
||||||
throws SnapshotAccessControlException, UnresolvedLinkException,
|
throws IOException;
|
||||||
FileNotFoundException, QuotaExceededException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set permissions for an existing file/directory.
|
* Set permissions for an existing file/directory.
|
||||||
@ -293,9 +282,8 @@ public void setStoragePolicy(String src, String policyName)
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void setPermission(String src, FsPermission permission)
|
void setPermission(String src, FsPermission permission)
|
||||||
throws AccessControlException, FileNotFoundException, SafeModeException,
|
throws IOException;
|
||||||
UnresolvedLinkException, SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Owner of a path (i.e. a file or a directory).
|
* Set Owner of a path (i.e. a file or a directory).
|
||||||
@ -312,9 +300,8 @@ public void setPermission(String src, FsPermission permission)
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void setOwner(String src, String username, String groupname)
|
void setOwner(String src, String username, String groupname)
|
||||||
throws AccessControlException, FileNotFoundException, SafeModeException,
|
throws IOException;
|
||||||
UnresolvedLinkException, SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The client can give up on a block by calling abandonBlock().
|
* The client can give up on a block by calling abandonBlock().
|
||||||
@ -334,10 +321,9 @@ public void setOwner(String src, String username, String groupname)
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void abandonBlock(ExtendedBlock b, long fileId,
|
void abandonBlock(ExtendedBlock b, long fileId,
|
||||||
String src, String holder)
|
String src, String holder)
|
||||||
throws AccessControlException, FileNotFoundException,
|
throws IOException;
|
||||||
UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A client that wants to write an additional block to the
|
* A client that wants to write an additional block to the
|
||||||
@ -372,12 +358,10 @@ public void abandonBlock(ExtendedBlock b, long fileId,
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public LocatedBlock addBlock(String src, String clientName,
|
LocatedBlock addBlock(String src, String clientName,
|
||||||
ExtendedBlock previous, DatanodeInfo[] excludeNodes, long fileId,
|
ExtendedBlock previous, DatanodeInfo[] excludeNodes, long fileId,
|
||||||
String[] favoredNodes)
|
String[] favoredNodes)
|
||||||
throws AccessControlException, FileNotFoundException,
|
throws IOException;
|
||||||
NotReplicatedYetException, SafeModeException, UnresolvedLinkException,
|
|
||||||
IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a datanode for an existing pipeline.
|
* Get a datanode for an existing pipeline.
|
||||||
@ -399,14 +383,13 @@ public LocatedBlock addBlock(String src, String clientName,
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public LocatedBlock getAdditionalDatanode(final String src,
|
LocatedBlock getAdditionalDatanode(final String src,
|
||||||
final long fileId, final ExtendedBlock blk,
|
final long fileId, final ExtendedBlock blk,
|
||||||
final DatanodeInfo[] existings,
|
final DatanodeInfo[] existings,
|
||||||
final String[] existingStorageIDs,
|
final String[] existingStorageIDs,
|
||||||
final DatanodeInfo[] excludes,
|
final DatanodeInfo[] excludes,
|
||||||
final int numAdditionalNodes, final String clientName
|
final int numAdditionalNodes, final String clientName
|
||||||
) throws AccessControlException, FileNotFoundException,
|
) throws IOException;
|
||||||
SafeModeException, UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The client is done writing data to the given filename, and would
|
* The client is done writing data to the given filename, and would
|
||||||
@ -438,10 +421,9 @@ public LocatedBlock getAdditionalDatanode(final String src,
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public boolean complete(String src, String clientName,
|
boolean complete(String src, String clientName,
|
||||||
ExtendedBlock last, long fileId)
|
ExtendedBlock last, long fileId)
|
||||||
throws AccessControlException, FileNotFoundException, SafeModeException,
|
throws IOException;
|
||||||
UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The client wants to report corrupted blocks (blocks with specified
|
* The client wants to report corrupted blocks (blocks with specified
|
||||||
@ -449,7 +431,7 @@ public boolean complete(String src, String clientName,
|
|||||||
* @param blocks Array of located blocks to report
|
* @param blocks Array of located blocks to report
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void reportBadBlocks(LocatedBlock[] blocks) throws IOException;
|
void reportBadBlocks(LocatedBlock[] blocks) throws IOException;
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
// Namespace management
|
// Namespace management
|
||||||
@ -465,11 +447,11 @@ public boolean complete(String src, String clientName,
|
|||||||
* @throws IOException an I/O error occurred
|
* @throws IOException an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public boolean rename(String src, String dst)
|
boolean rename(String src, String dst)
|
||||||
throws UnresolvedLinkException, SnapshotAccessControlException, IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves blocks from srcs to trg and delete srcs
|
* Moves blocks from srcs to trg and delete srcs.
|
||||||
*
|
*
|
||||||
* @param trg existing file
|
* @param trg existing file
|
||||||
* @param srcs - list of existing files (same block size, same replication)
|
* @param srcs - list of existing files (same block size, same replication)
|
||||||
@ -479,8 +461,8 @@ public boolean rename(String src, String dst)
|
|||||||
* @throws SnapshotAccessControlException if path is in RO snapshot
|
* @throws SnapshotAccessControlException if path is in RO snapshot
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void concat(String trg, String[] srcs)
|
void concat(String trg, String[] srcs)
|
||||||
throws IOException, UnresolvedLinkException, SnapshotAccessControlException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rename src to dst.
|
* Rename src to dst.
|
||||||
@ -504,7 +486,7 @@ public void concat(String trg, String[] srcs)
|
|||||||
* @throws DSQuotaExceededException If rename violates disk space
|
* @throws DSQuotaExceededException If rename violates disk space
|
||||||
* quota restriction
|
* quota restriction
|
||||||
* @throws FileAlreadyExistsException If <code>dst</code> already exists and
|
* @throws FileAlreadyExistsException If <code>dst</code> already exists and
|
||||||
* <code>options</options> has {@link Rename#OVERWRITE} option
|
* <code>options</code> has {@link Rename#OVERWRITE} option
|
||||||
* false.
|
* false.
|
||||||
* @throws FileNotFoundException If <code>src</code> does not exist
|
* @throws FileNotFoundException If <code>src</code> does not exist
|
||||||
* @throws NSQuotaExceededException If rename violates namespace
|
* @throws NSQuotaExceededException If rename violates namespace
|
||||||
@ -518,11 +500,8 @@ public void concat(String trg, String[] srcs)
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void rename2(String src, String dst, Options.Rename... options)
|
void rename2(String src, String dst, Options.Rename... options)
|
||||||
throws AccessControlException, DSQuotaExceededException,
|
throws IOException;
|
||||||
FileAlreadyExistsException, FileNotFoundException,
|
|
||||||
NSQuotaExceededException, ParentNotDirectoryException, SafeModeException,
|
|
||||||
UnresolvedLinkException, SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Truncate file src to new size.
|
* Truncate file src to new size.
|
||||||
@ -550,9 +529,8 @@ public void rename2(String src, String dst, Options.Rename... options)
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public boolean truncate(String src, long newLength, String clientName)
|
boolean truncate(String src, long newLength, String clientName)
|
||||||
throws AccessControlException, FileNotFoundException, SafeModeException,
|
throws IOException;
|
||||||
UnresolvedLinkException, SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the given file or directory from the file system.
|
* Delete the given file or directory from the file system.
|
||||||
@ -573,9 +551,8 @@ public boolean truncate(String src, long newLength, String clientName)
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public boolean delete(String src, boolean recursive)
|
boolean delete(String src, boolean recursive)
|
||||||
throws AccessControlException, FileNotFoundException, SafeModeException,
|
throws IOException;
|
||||||
UnresolvedLinkException, SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a directory (or hierarchy of directories) with the given
|
* Create a directory (or hierarchy of directories) with the given
|
||||||
@ -591,7 +568,8 @@ public boolean delete(String src, boolean recursive)
|
|||||||
* @throws FileAlreadyExistsException If <code>src</code> already exists
|
* @throws FileAlreadyExistsException If <code>src</code> already exists
|
||||||
* @throws FileNotFoundException If parent of <code>src</code> does not exist
|
* @throws FileNotFoundException If parent of <code>src</code> does not exist
|
||||||
* and <code>createParent</code> is false
|
* and <code>createParent</code> is false
|
||||||
* @throws NSQuotaExceededException If file creation violates quota restriction
|
* @throws NSQuotaExceededException If file creation violates quota
|
||||||
|
* restriction
|
||||||
* @throws ParentNotDirectoryException If parent of <code>src</code>
|
* @throws ParentNotDirectoryException If parent of <code>src</code>
|
||||||
* is not a directory
|
* is not a directory
|
||||||
* @throws SafeModeException create not allowed in safemode
|
* @throws SafeModeException create not allowed in safemode
|
||||||
@ -603,14 +581,11 @@ public boolean delete(String src, boolean recursive)
|
|||||||
* @throws InvalidPathException If <code>src</code> is invalid
|
* @throws InvalidPathException If <code>src</code> is invalid
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public boolean mkdirs(String src, FsPermission masked, boolean createParent)
|
boolean mkdirs(String src, FsPermission masked, boolean createParent)
|
||||||
throws AccessControlException, FileAlreadyExistsException,
|
throws IOException;
|
||||||
FileNotFoundException, NSQuotaExceededException,
|
|
||||||
ParentNotDirectoryException, SafeModeException, UnresolvedLinkException,
|
|
||||||
SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a partial listing of the indicated directory
|
* Get a partial listing of the indicated directory.
|
||||||
*
|
*
|
||||||
* @param src the directory name
|
* @param src the directory name
|
||||||
* @param startAfter the name to start listing after encoded in java UTF8
|
* @param startAfter the name to start listing after encoded in java UTF8
|
||||||
@ -624,20 +599,17 @@ public boolean mkdirs(String src, FsPermission masked, boolean createParent)
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public DirectoryListing getListing(String src,
|
DirectoryListing getListing(String src, byte[] startAfter,
|
||||||
byte[] startAfter,
|
boolean needLocation) throws IOException;
|
||||||
boolean needLocation)
|
|
||||||
throws AccessControlException, FileNotFoundException,
|
|
||||||
UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get listing of all the snapshottable directories
|
* Get listing of all the snapshottable directories.
|
||||||
*
|
*
|
||||||
* @return Information about all the current snapshottable directory
|
* @return Information about all the current snapshottable directory
|
||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public SnapshottableDirectoryStatus[] getSnapshottableDirListing()
|
SnapshottableDirectoryStatus[] getSnapshottableDirListing()
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
@ -664,8 +636,7 @@ public SnapshottableDirectoryStatus[] getSnapshottableDirListing()
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void renewLease(String clientName) throws AccessControlException,
|
void renewLease(String clientName) throws IOException;
|
||||||
IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start lease recovery.
|
* Start lease recovery.
|
||||||
@ -677,15 +648,15 @@ public void renewLease(String clientName) throws AccessControlException,
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public boolean recoverLease(String src, String clientName) throws IOException;
|
boolean recoverLease(String src, String clientName) throws IOException;
|
||||||
|
|
||||||
public int GET_STATS_CAPACITY_IDX = 0;
|
int GET_STATS_CAPACITY_IDX = 0;
|
||||||
public int GET_STATS_USED_IDX = 1;
|
int GET_STATS_USED_IDX = 1;
|
||||||
public int GET_STATS_REMAINING_IDX = 2;
|
int GET_STATS_REMAINING_IDX = 2;
|
||||||
public int GET_STATS_UNDER_REPLICATED_IDX = 3;
|
int GET_STATS_UNDER_REPLICATED_IDX = 3;
|
||||||
public int GET_STATS_CORRUPT_BLOCKS_IDX = 4;
|
int GET_STATS_CORRUPT_BLOCKS_IDX = 4;
|
||||||
public int GET_STATS_MISSING_BLOCKS_IDX = 5;
|
int GET_STATS_MISSING_BLOCKS_IDX = 5;
|
||||||
public int GET_STATS_MISSING_REPL_ONE_BLOCKS_IDX = 6;
|
int GET_STATS_MISSING_REPL_ONE_BLOCKS_IDX = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a set of statistics about the filesystem.
|
* Get a set of statistics about the filesystem.
|
||||||
@ -704,7 +675,7 @@ public void renewLease(String clientName) throws AccessControlException,
|
|||||||
* actual numbers to index into the array.
|
* actual numbers to index into the array.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public long[] getStats() throws IOException;
|
long[] getStats() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a report on the system's current datanodes.
|
* Get a report on the system's current datanodes.
|
||||||
@ -713,14 +684,14 @@ public void renewLease(String clientName) throws AccessControlException,
|
|||||||
* otherwise all datanodes if type is ALL.
|
* otherwise all datanodes if type is ALL.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public DatanodeInfo[] getDatanodeReport(HdfsConstants.DatanodeReportType type)
|
DatanodeInfo[] getDatanodeReport(HdfsConstants.DatanodeReportType type)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a report on the current datanode storages.
|
* Get a report on the current datanode storages.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public DatanodeStorageReport[] getDatanodeStorageReport(
|
DatanodeStorageReport[] getDatanodeStorageReport(
|
||||||
HdfsConstants.DatanodeReportType type) throws IOException;
|
HdfsConstants.DatanodeReportType type) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -731,8 +702,8 @@ public DatanodeStorageReport[] getDatanodeStorageReport(
|
|||||||
* @throws UnresolvedLinkException if the path contains a symlink.
|
* @throws UnresolvedLinkException if the path contains a symlink.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public long getPreferredBlockSize(String filename)
|
long getPreferredBlockSize(String filename)
|
||||||
throws IOException, UnresolvedLinkException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter, leave or get safe mode.
|
* Enter, leave or get safe mode.
|
||||||
@ -744,7 +715,8 @@ public long getPreferredBlockSize(String filename)
|
|||||||
* <p>
|
* <p>
|
||||||
* Safe mode is entered automatically at name node startup.
|
* Safe mode is entered automatically at name node startup.
|
||||||
* Safe mode can also be entered manually using
|
* Safe mode can also be entered manually using
|
||||||
* {@link #setSafeMode(HdfsConstants.SafeModeAction,boolean) setSafeMode(SafeModeAction.SAFEMODE_ENTER,false)}.
|
* {@link #setSafeMode(HdfsConstants.SafeModeAction,boolean)
|
||||||
|
* setSafeMode(SafeModeAction.SAFEMODE_ENTER,false)}.
|
||||||
* <p>
|
* <p>
|
||||||
* At startup the name node accepts data node reports collecting
|
* At startup the name node accepts data node reports collecting
|
||||||
* information about block locations.
|
* information about block locations.
|
||||||
@ -760,11 +732,14 @@ public long getPreferredBlockSize(String filename)
|
|||||||
* Then the name node leaves safe mode.
|
* Then the name node leaves safe mode.
|
||||||
* <p>
|
* <p>
|
||||||
* If safe mode is turned on manually using
|
* If safe mode is turned on manually using
|
||||||
* {@link #setSafeMode(HdfsConstants.SafeModeAction,boolean) setSafeMode(SafeModeAction.SAFEMODE_ENTER,false)}
|
* {@link #setSafeMode(HdfsConstants.SafeModeAction,boolean)
|
||||||
|
* setSafeMode(SafeModeAction.SAFEMODE_ENTER,false)}
|
||||||
* then the name node stays in safe mode until it is manually turned off
|
* then the name node stays in safe mode until it is manually turned off
|
||||||
* using {@link #setSafeMode(HdfsConstants.SafeModeAction,boolean) setSafeMode(SafeModeAction.SAFEMODE_LEAVE,false)}.
|
* using {@link #setSafeMode(HdfsConstants.SafeModeAction,boolean)
|
||||||
|
* setSafeMode(SafeModeAction.SAFEMODE_LEAVE,false)}.
|
||||||
* Current state of the name node can be verified using
|
* Current state of the name node can be verified using
|
||||||
* {@link #setSafeMode(HdfsConstants.SafeModeAction,boolean) setSafeMode(SafeModeAction.SAFEMODE_GET,false)}
|
* {@link #setSafeMode(HdfsConstants.SafeModeAction,boolean)
|
||||||
|
* setSafeMode(SafeModeAction.SAFEMODE_GET,false)}
|
||||||
* <h4>Configuration parameters:</h4>
|
* <h4>Configuration parameters:</h4>
|
||||||
* <tt>dfs.safemode.threshold.pct</tt> is the threshold parameter.<br>
|
* <tt>dfs.safemode.threshold.pct</tt> is the threshold parameter.<br>
|
||||||
* <tt>dfs.safemode.extension</tt> is the safe mode extension parameter.<br>
|
* <tt>dfs.safemode.extension</tt> is the safe mode extension parameter.<br>
|
||||||
@ -790,7 +765,7 @@ public long getPreferredBlockSize(String filename)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public boolean setSafeMode(HdfsConstants.SafeModeAction action, boolean isChecked)
|
boolean setSafeMode(HdfsConstants.SafeModeAction action, boolean isChecked)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -808,8 +783,7 @@ public boolean setSafeMode(HdfsConstants.SafeModeAction action, boolean isChecke
|
|||||||
* @throws IOException if image creation failed.
|
* @throws IOException if image creation failed.
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public boolean saveNamespace(long timeWindow, long txGap) throws IOException;
|
boolean saveNamespace(long timeWindow, long txGap) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Roll the edit log.
|
* Roll the edit log.
|
||||||
@ -820,7 +794,7 @@ public boolean setSafeMode(HdfsConstants.SafeModeAction action, boolean isChecke
|
|||||||
* @return the txid of the new segment
|
* @return the txid of the new segment
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public long rollEdits() throws AccessControlException, IOException;
|
long rollEdits() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/Disable restore failed storage.
|
* Enable/Disable restore failed storage.
|
||||||
@ -830,15 +804,14 @@ public boolean setSafeMode(HdfsConstants.SafeModeAction action, boolean isChecke
|
|||||||
* @throws AccessControlException if the superuser privilege is violated.
|
* @throws AccessControlException if the superuser privilege is violated.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public boolean restoreFailedStorage(String arg)
|
boolean restoreFailedStorage(String arg) throws IOException;
|
||||||
throws AccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells the namenode to reread the hosts and exclude files.
|
* Tells the namenode to reread the hosts and exclude files.
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void refreshNodes() throws IOException;
|
void refreshNodes() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finalize previous upgrade.
|
* Finalize previous upgrade.
|
||||||
@ -848,7 +821,7 @@ public boolean restoreFailedStorage(String arg)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void finalizeUpgrade() throws IOException;
|
void finalizeUpgrade() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rolling upgrade operations.
|
* Rolling upgrade operations.
|
||||||
@ -857,7 +830,7 @@ public boolean restoreFailedStorage(String arg)
|
|||||||
* progress, returns null.
|
* progress, returns null.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public RollingUpgradeInfo rollingUpgrade(RollingUpgradeAction action)
|
RollingUpgradeInfo rollingUpgrade(RollingUpgradeAction action)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -871,7 +844,7 @@ public RollingUpgradeInfo rollingUpgrade(RollingUpgradeAction action)
|
|||||||
* cookie returned from the previous call.
|
* cookie returned from the previous call.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -881,7 +854,7 @@ public CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void metaSave(String filename) throws IOException;
|
void metaSave(String filename) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell all datanodes to use a new, non-persistent bandwidth value for
|
* Tell all datanodes to use a new, non-persistent bandwidth value for
|
||||||
@ -891,7 +864,7 @@ public CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void setBalancerBandwidth(long bandwidth) throws IOException;
|
void setBalancerBandwidth(long bandwidth) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the file info for a specific file or directory.
|
* Get the file info for a specific file or directory.
|
||||||
@ -905,11 +878,10 @@ public CorruptFileBlocks listCorruptFileBlocks(String path, String cookie)
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public HdfsFileStatus getFileInfo(String src) throws AccessControlException,
|
HdfsFileStatus getFileInfo(String src) throws IOException;
|
||||||
FileNotFoundException, UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the close status of a file
|
* Get the close status of a file.
|
||||||
* @param src The string representation of the path to the file
|
* @param src The string representation of the path to the file
|
||||||
*
|
*
|
||||||
* @return return true if file is closed
|
* @return return true if file is closed
|
||||||
@ -919,8 +891,7 @@ public HdfsFileStatus getFileInfo(String src) throws AccessControlException,
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public boolean isFileClosed(String src) throws AccessControlException,
|
boolean isFileClosed(String src) throws IOException;
|
||||||
FileNotFoundException, UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the file info for a specific file or directory. If the path
|
* Get the file info for a specific file or directory. If the path
|
||||||
@ -935,8 +906,7 @@ public boolean isFileClosed(String src) throws AccessControlException,
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public HdfsFileStatus getFileLinkInfo(String src)
|
HdfsFileStatus getFileLinkInfo(String src) throws IOException;
|
||||||
throws AccessControlException, UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get {@link ContentSummary} rooted at the specified directory.
|
* Get {@link ContentSummary} rooted at the specified directory.
|
||||||
@ -948,21 +918,19 @@ public HdfsFileStatus getFileLinkInfo(String src)
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public ContentSummary getContentSummary(String path)
|
ContentSummary getContentSummary(String path) throws IOException;
|
||||||
throws AccessControlException, FileNotFoundException,
|
|
||||||
UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the quota for a directory.
|
* Set the quota for a directory.
|
||||||
* @param path The string representation of the path to the directory
|
* @param path The string representation of the path to the directory
|
||||||
* @param namespaceQuota Limit on the number of names in the tree rooted
|
* @param namespaceQuota Limit on the number of names in the tree rooted
|
||||||
* at the directory
|
* at the directory
|
||||||
* @param storagespaceQuota Limit on storage space occupied all the files under
|
* @param storagespaceQuota Limit on storage space occupied all the files
|
||||||
* this directory.
|
* under this directory.
|
||||||
* @param type StorageType that the space quota is intended to be set on.
|
* @param type StorageType that the space quota is intended to be set on.
|
||||||
* It may be null when called by traditional space/namespace quota.
|
* It may be null when called by traditional space/namespace
|
||||||
* When type is is not null, the storagespaceQuota parameter is for
|
* quota. When type is is not null, the storagespaceQuota
|
||||||
* type specified and namespaceQuota must be
|
* parameter is for type specified and namespaceQuota must be
|
||||||
* {@link HdfsConstants#QUOTA_DONT_SET}.
|
* {@link HdfsConstants#QUOTA_DONT_SET}.
|
||||||
*
|
*
|
||||||
* <br><br>
|
* <br><br>
|
||||||
@ -976,14 +944,14 @@ public ContentSummary getContentSummary(String path)
|
|||||||
* @throws FileNotFoundException file <code>path</code> is not found
|
* @throws FileNotFoundException file <code>path</code> is not found
|
||||||
* @throws QuotaExceededException if the directory size
|
* @throws QuotaExceededException if the directory size
|
||||||
* is greater than the given quota
|
* is greater than the given quota
|
||||||
* @throws UnresolvedLinkException if the <code>path</code> contains a symlink.
|
* @throws UnresolvedLinkException if the <code>path</code> contains
|
||||||
|
* a symlink.
|
||||||
* @throws SnapshotAccessControlException if path is in RO snapshot
|
* @throws SnapshotAccessControlException if path is in RO snapshot
|
||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void setQuota(String path, long namespaceQuota, long storagespaceQuota,
|
void setQuota(String path, long namespaceQuota, long storagespaceQuota,
|
||||||
StorageType type) throws AccessControlException, FileNotFoundException,
|
StorageType type) throws IOException;
|
||||||
UnresolvedLinkException, SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write all metadata for this file into persistent storage.
|
* Write all metadata for this file into persistent storage.
|
||||||
@ -1000,17 +968,15 @@ public void setQuota(String path, long namespaceQuota, long storagespaceQuota,
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void fsync(String src, long inodeId, String client,
|
void fsync(String src, long inodeId, String client, long lastBlockLength)
|
||||||
long lastBlockLength)
|
throws IOException;
|
||||||
throws AccessControlException, FileNotFoundException,
|
|
||||||
UnresolvedLinkException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the modification and access time of the file to the specified time.
|
* Sets the modification and access time of the file to the specified time.
|
||||||
* @param src The string representation of the path
|
* @param src The string representation of the path
|
||||||
* @param mtime The number of milliseconds since Jan 1, 1970.
|
* @param mtime The number of milliseconds since Jan 1, 1970.
|
||||||
* Setting mtime to -1 means that modification time should not be set
|
* Setting mtime to -1 means that modification time should not
|
||||||
* by this call.
|
* be set by this call.
|
||||||
* @param atime The number of milliseconds since Jan 1, 1970.
|
* @param atime The number of milliseconds since Jan 1, 1970.
|
||||||
* Setting atime to -1 means that access time should not be set
|
* Setting atime to -1 means that access time should not be set
|
||||||
* by this call.
|
* by this call.
|
||||||
@ -1022,9 +988,7 @@ public void fsync(String src, long inodeId, String client,
|
|||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void setTimes(String src, long mtime, long atime)
|
void setTimes(String src, long mtime, long atime) throws IOException;
|
||||||
throws AccessControlException, FileNotFoundException,
|
|
||||||
UnresolvedLinkException, SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create symlink to a file or directory.
|
* Create symlink to a file or directory.
|
||||||
@ -1041,16 +1005,13 @@ public void setTimes(String src, long mtime, long atime)
|
|||||||
* and <code>createParent</code> is false
|
* and <code>createParent</code> is false
|
||||||
* @throws ParentNotDirectoryException If parent of <code>link</code> is not a
|
* @throws ParentNotDirectoryException If parent of <code>link</code> is not a
|
||||||
* directory.
|
* directory.
|
||||||
* @throws UnresolvedLinkException if <code>link</target> contains a symlink.
|
* @throws UnresolvedLinkException if <code>link</code> contains a symlink.
|
||||||
* @throws SnapshotAccessControlException if path is in RO snapshot
|
* @throws SnapshotAccessControlException if path is in RO snapshot
|
||||||
* @throws IOException If an I/O error occurred
|
* @throws IOException If an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void createSymlink(String target, String link, FsPermission dirPerm,
|
void createSymlink(String target, String link, FsPermission dirPerm,
|
||||||
boolean createParent) throws AccessControlException,
|
boolean createParent) throws IOException;
|
||||||
FileAlreadyExistsException, FileNotFoundException,
|
|
||||||
ParentNotDirectoryException, SafeModeException, UnresolvedLinkException,
|
|
||||||
SnapshotAccessControlException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the target of the given symlink. If there is an intermediate
|
* Return the target of the given symlink. If there is an intermediate
|
||||||
@ -1065,8 +1026,7 @@ public void createSymlink(String target, String link, FsPermission dirPerm,
|
|||||||
* or an I/O error occurred
|
* or an I/O error occurred
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public String getLinkTarget(String path) throws AccessControlException,
|
String getLinkTarget(String path) throws IOException;
|
||||||
FileNotFoundException, IOException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a new generation stamp together with an access token for
|
* Get a new generation stamp together with an access token for
|
||||||
@ -1081,11 +1041,11 @@ public String getLinkTarget(String path) throws AccessControlException,
|
|||||||
* @throws IOException if any error occurs
|
* @throws IOException if any error occurs
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public LocatedBlock updateBlockForPipeline(ExtendedBlock block,
|
LocatedBlock updateBlockForPipeline(ExtendedBlock block,
|
||||||
String clientName) throws IOException;
|
String clientName) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update a pipeline for a block under construction
|
* Update a pipeline for a block under construction.
|
||||||
*
|
*
|
||||||
* @param clientName the name of the client
|
* @param clientName the name of the client
|
||||||
* @param oldBlock the old block
|
* @param oldBlock the old block
|
||||||
@ -1094,7 +1054,7 @@ public LocatedBlock updateBlockForPipeline(ExtendedBlock block,
|
|||||||
* @throws IOException if any error occurs
|
* @throws IOException if any error occurs
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void updatePipeline(String clientName, ExtendedBlock oldBlock,
|
void updatePipeline(String clientName, ExtendedBlock oldBlock,
|
||||||
ExtendedBlock newBlock, DatanodeID[] newNodes, String[] newStorageIDs)
|
ExtendedBlock newBlock, DatanodeID[] newNodes, String[] newStorageIDs)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
@ -1106,7 +1066,7 @@ public void updatePipeline(String clientName, ExtendedBlock oldBlock,
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer)
|
Token<DelegationTokenIdentifier> getDelegationToken(Text renewer)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1117,7 +1077,7 @@ public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public long renewDelegationToken(Token<DelegationTokenIdentifier> token)
|
long renewDelegationToken(Token<DelegationTokenIdentifier> token)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1127,7 +1087,7 @@ public long renewDelegationToken(Token<DelegationTokenIdentifier> token)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void cancelDelegationToken(Token<DelegationTokenIdentifier> token)
|
void cancelDelegationToken(Token<DelegationTokenIdentifier> token)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1136,38 +1096,38 @@ public void cancelDelegationToken(Token<DelegationTokenIdentifier> token)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public DataEncryptionKey getDataEncryptionKey() throws IOException;
|
DataEncryptionKey getDataEncryptionKey() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a snapshot
|
* Create a snapshot.
|
||||||
* @param snapshotRoot the path that is being snapshotted
|
* @param snapshotRoot the path that is being snapshotted
|
||||||
* @param snapshotName name of the snapshot created
|
* @param snapshotName name of the snapshot created
|
||||||
* @return the snapshot path.
|
* @return the snapshot path.
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public String createSnapshot(String snapshotRoot, String snapshotName)
|
String createSnapshot(String snapshotRoot, String snapshotName)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a specific snapshot of a snapshottable directory
|
* Delete a specific snapshot of a snapshottable directory.
|
||||||
* @param snapshotRoot The snapshottable directory
|
* @param snapshotRoot The snapshottable directory
|
||||||
* @param snapshotName Name of the snapshot for the snapshottable directory
|
* @param snapshotName Name of the snapshot for the snapshottable directory
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void deleteSnapshot(String snapshotRoot, String snapshotName)
|
void deleteSnapshot(String snapshotRoot, String snapshotName)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rename a snapshot
|
* Rename a snapshot.
|
||||||
* @param snapshotRoot the directory path where the snapshot was taken
|
* @param snapshotRoot the directory path where the snapshot was taken
|
||||||
* @param snapshotOldName old name of the snapshot
|
* @param snapshotOldName old name of the snapshot
|
||||||
* @param snapshotNewName new name of the snapshot
|
* @param snapshotNewName new name of the snapshot
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void renameSnapshot(String snapshotRoot, String snapshotOldName,
|
void renameSnapshot(String snapshotRoot, String snapshotOldName,
|
||||||
String snapshotNewName) throws IOException;
|
String snapshotNewName) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1176,7 +1136,7 @@ public void renameSnapshot(String snapshotRoot, String snapshotOldName,
|
|||||||
* @throws IOException on error
|
* @throws IOException on error
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void allowSnapshot(String snapshotRoot)
|
void allowSnapshot(String snapshotRoot)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1185,7 +1145,7 @@ public void allowSnapshot(String snapshotRoot)
|
|||||||
* @throws IOException on error
|
* @throws IOException on error
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void disallowSnapshot(String snapshotRoot)
|
void disallowSnapshot(String snapshotRoot)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1204,7 +1164,7 @@ public void disallowSnapshot(String snapshotRoot)
|
|||||||
* @throws IOException on error
|
* @throws IOException on error
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot,
|
SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot,
|
||||||
String fromSnapshot, String toSnapshot) throws IOException;
|
String fromSnapshot, String toSnapshot) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1216,7 +1176,7 @@ public SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot,
|
|||||||
* @throws IOException if the directive could not be added
|
* @throws IOException if the directive could not be added
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public long addCacheDirective(CacheDirectiveInfo directive,
|
long addCacheDirective(CacheDirectiveInfo directive,
|
||||||
EnumSet<CacheFlag> flags) throws IOException;
|
EnumSet<CacheFlag> flags) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1226,7 +1186,7 @@ public long addCacheDirective(CacheDirectiveInfo directive,
|
|||||||
* @throws IOException if the directive could not be modified
|
* @throws IOException if the directive could not be modified
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void modifyCacheDirective(CacheDirectiveInfo directive,
|
void modifyCacheDirective(CacheDirectiveInfo directive,
|
||||||
EnumSet<CacheFlag> flags) throws IOException;
|
EnumSet<CacheFlag> flags) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1236,7 +1196,7 @@ public void modifyCacheDirective(CacheDirectiveInfo directive,
|
|||||||
* @throws IOException if the cache directive could not be removed
|
* @throws IOException if the cache directive could not be removed
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void removeCacheDirective(long id) throws IOException;
|
void removeCacheDirective(long id) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List the set of cached paths of a cache pool. Incrementally fetches results
|
* List the set of cached paths of a cache pool. Incrementally fetches results
|
||||||
@ -1249,7 +1209,7 @@ public void modifyCacheDirective(CacheDirectiveInfo directive,
|
|||||||
* @return A batch of CacheDirectiveEntry objects.
|
* @return A batch of CacheDirectiveEntry objects.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
||||||
long prevId, CacheDirectiveInfo filter) throws IOException;
|
long prevId, CacheDirectiveInfo filter) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1259,7 +1219,7 @@ public BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
|||||||
* @throws IOException If the request could not be completed.
|
* @throws IOException If the request could not be completed.
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void addCachePool(CachePoolInfo info) throws IOException;
|
void addCachePool(CachePoolInfo info) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify an existing cache pool.
|
* Modify an existing cache pool.
|
||||||
@ -1270,7 +1230,7 @@ public BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
|||||||
* If the request could not be completed.
|
* If the request could not be completed.
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void modifyCachePool(CachePoolInfo req) throws IOException;
|
void modifyCachePool(CachePoolInfo req) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a cache pool.
|
* Remove a cache pool.
|
||||||
@ -1280,17 +1240,17 @@ public BatchedEntries<CacheDirectiveEntry> listCacheDirectives(
|
|||||||
* removed.
|
* removed.
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void removeCachePool(String pool) throws IOException;
|
void removeCachePool(String pool) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List the set of cache pools. Incrementally fetches results from the server.
|
* List the set of cache pools. Incrementally fetches results from the server.
|
||||||
*
|
*
|
||||||
* @param prevPool name of the last pool listed, or the empty string if this is
|
* @param prevPool name of the last pool listed, or the empty string if this
|
||||||
* the first invocation of listCachePools
|
* is the first invocation of listCachePools
|
||||||
* @return A batch of CachePoolEntry objects.
|
* @return A batch of CachePoolEntry objects.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public BatchedEntries<CachePoolEntry> listCachePools(String prevPool)
|
BatchedEntries<CachePoolEntry> listCachePools(String prevPool)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1300,7 +1260,7 @@ public BatchedEntries<CachePoolEntry> listCachePools(String prevPool)
|
|||||||
* changes. (Modifications are merged into the current ACL.)
|
* changes. (Modifications are merged into the current ACL.)
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void modifyAclEntries(String src, List<AclEntry> aclSpec)
|
void modifyAclEntries(String src, List<AclEntry> aclSpec)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1308,14 +1268,14 @@ public void modifyAclEntries(String src, List<AclEntry> aclSpec)
|
|||||||
* retained.
|
* retained.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void removeAclEntries(String src, List<AclEntry> aclSpec)
|
void removeAclEntries(String src, List<AclEntry> aclSpec)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes all default ACL entries from files and directories.
|
* Removes all default ACL entries from files and directories.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void removeDefaultAcl(String src) throws IOException;
|
void removeDefaultAcl(String src) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes all but the base ACL entries of files and directories. The entries
|
* Removes all but the base ACL entries of files and directories. The entries
|
||||||
@ -1323,33 +1283,33 @@ public void removeAclEntries(String src, List<AclEntry> aclSpec)
|
|||||||
* bits.
|
* bits.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void removeAcl(String src) throws IOException;
|
void removeAcl(String src) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fully replaces ACL of files and directories, discarding all existing
|
* Fully replaces ACL of files and directories, discarding all existing
|
||||||
* entries.
|
* entries.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void setAcl(String src, List<AclEntry> aclSpec) throws IOException;
|
void setAcl(String src, List<AclEntry> aclSpec) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the ACLs of files and directories.
|
* Gets the ACLs of files and directories.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public AclStatus getAclStatus(String src) throws IOException;
|
AclStatus getAclStatus(String src) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an encryption zone
|
* Create an encryption zone.
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void createEncryptionZone(String src, String keyName)
|
void createEncryptionZone(String src, String keyName)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the encryption zone for a path.
|
* Get the encryption zone for a path.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public EncryptionZone getEZForPath(String src)
|
EncryptionZone getEZForPath(String src)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1360,7 +1320,7 @@ public EncryptionZone getEZForPath(String src)
|
|||||||
* @return Batch of encryption zones.
|
* @return Batch of encryption zones.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public BatchedEntries<EncryptionZone> listEncryptionZones(
|
BatchedEntries<EncryptionZone> listEncryptionZones(
|
||||||
long prevId) throws IOException;
|
long prevId) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1376,7 +1336,7 @@ public BatchedEntries<EncryptionZone> listEncryptionZones(
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void setXAttr(String src, XAttr xAttr, EnumSet<XAttrSetFlag> flag)
|
void setXAttr(String src, XAttr xAttr, EnumSet<XAttrSetFlag> flag)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1393,7 +1353,7 @@ public void setXAttr(String src, XAttr xAttr, EnumSet<XAttrSetFlag> flag)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public List<XAttr> getXAttrs(String src, List<XAttr> xAttrs)
|
List<XAttr> getXAttrs(String src, List<XAttr> xAttrs)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1408,7 +1368,7 @@ public List<XAttr> getXAttrs(String src, List<XAttr> xAttrs)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public List<XAttr> listXAttrs(String src)
|
List<XAttr> listXAttrs(String src)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1423,7 +1383,7 @@ public List<XAttr> listXAttrs(String src)
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@AtMostOnce
|
@AtMostOnce
|
||||||
public void removeXAttr(String src, XAttr xAttr) throws IOException;
|
void removeXAttr(String src, XAttr xAttr) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the user can access a path. The mode specifies which access
|
* Checks if the user can access a path. The mode specifies which access
|
||||||
@ -1441,7 +1401,7 @@ public List<XAttr> listXAttrs(String src)
|
|||||||
* @throws IOException see specific implementation
|
* @throws IOException see specific implementation
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public void checkAccess(String path, FsAction mode) throws IOException;
|
void checkAccess(String path, FsAction mode) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the highest txid the NameNode knows has been written to the edit
|
* Get the highest txid the NameNode knows has been written to the edit
|
||||||
@ -1449,12 +1409,12 @@ public List<XAttr> listXAttrs(String src)
|
|||||||
* the starting point for the inotify event stream.
|
* the starting point for the inotify event stream.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public long getCurrentEditLogTxid() throws IOException;
|
long getCurrentEditLogTxid() throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an ordered list of batches of events corresponding to the edit log
|
* Get an ordered list of batches of events corresponding to the edit log
|
||||||
* transactions for txids equal to or greater than txid.
|
* transactions for txids equal to or greater than txid.
|
||||||
*/
|
*/
|
||||||
@Idempotent
|
@Idempotent
|
||||||
public EventBatchList getEditsFromTxid(long txid) throws IOException;
|
EventBatchList getEditsFromTxid(long txid) throws IOException;
|
||||||
}
|
}
|
||||||
|
@ -704,6 +704,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
HDFS-8711. setSpaceQuota command should print the available storage type
|
HDFS-8711. setSpaceQuota command should print the available storage type
|
||||||
when input storage type is wrong. (Brahma Reddy Battula via xyao)
|
when input storage type is wrong. (Brahma Reddy Battula via xyao)
|
||||||
|
|
||||||
|
HDFS-8620. Clean up the checkstyle warinings about ClientProtocol.
|
||||||
|
(Takanobu Asanuma via wheat9)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||||
|
Loading…
Reference in New Issue
Block a user