@InterfaceAudience.Private @InterfaceStability.Evolving public interface ClientDatanodeProtocol
| Modifier and Type | Field and Description |
|---|---|
static long |
versionID
Until version 9, this class ClientDatanodeProtocol served as both
the client interface to the DN AND the RPC protocol used to
communicate with the NN.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteBlockPool(String bpid,
boolean force)
Delete the block pool directory.
|
BlockLocalPathInfo |
getBlockLocalPathInfo(ExtendedBlock block,
Token<BlockTokenIdentifier> token)
Retrieves the path names of the block file and metadata file stored on the
local file system.
|
HdfsBlocksMetadata |
getHdfsBlocksMetadata(List<ExtendedBlock> blocks,
List<Token<BlockTokenIdentifier>> tokens)
Retrieves volume location information about a list of blocks on a datanode.
|
long |
getReplicaVisibleLength(ExtendedBlock b)
Return the visible length of a replica.
|
void |
refreshNamenodes()
Refresh the list of federated namenodes from updated configuration
Adds new namenodes and stops the deleted namenodes.
|
static final long versionID
long getReplicaVisibleLength(ExtendedBlock b) throws IOException
IOExceptionvoid refreshNamenodes()
throws IOException
IOException - on errorvoid deleteBlockPool(String bpid, boolean force) throws IOException
bpid - Blockpool id to be deleted.force - If false blockpool directory is deleted only if it is empty
i.e. if it doesn't contain any block files, otherwise it is
deleted along with its contents.IOExceptionBlockLocalPathInfo getBlockLocalPathInfo(ExtendedBlock block, Token<BlockTokenIdentifier> token) throws IOException
block - the specified block on the local datanodetoken - the block access token.IOException - on errorHdfsBlocksMetadata getHdfsBlocksMetadata(List<ExtendedBlock> blocks, List<Token<BlockTokenIdentifier>> tokens) throws IOException
VolumeId for each configured
data directory, which is not guaranteed to be the same across DN restarts.blocks - list of blocks on the local datanodetokens - block access tokens corresponding to the requested blocksExtendedBlocks with
data directoriesIOException - if datanode is unreachable, or replica is not found on datanodeCopyright © 2013 Apache Software Foundation. All rights reserved.