Class RouterAsyncNamenodeProtocol
java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RouterNamenodeProtocol
org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncNamenodeProtocol
- All Implemented Interfaces:
org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol
Module that implements all the asynchronous RPC calls in
NamenodeProtocol in the
RouterRpcServer.-
Field Summary
Fields inherited from interface org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol
ACT_CHECKPOINT, ACT_SHUTDOWN, ACT_UNKNOWN, FATAL, NOTIFY, versionID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hdfs.security.token.block.ExportedBlockKeysAsynchronously get the current block keys.org.apache.hadoop.hdfs.server.protocol.BlocksWithLocationsgetBlocks(org.apache.hadoop.hdfs.protocol.DatanodeInfo datanode, long size, long minBlockSize, long hotBlockTimeInterval, org.apache.hadoop.fs.StorageType storageType) Asynchronously get a list of blocks belonging todatanodewhose total size equalssize.longAsynchronously get the transaction ID of the most recent checkpoint.longgetMostRecentNameNodeFileTxId(org.apache.hadoop.hdfs.server.namenode.NNStorage.NameNodeFile nnf) Asynchronously get the transaction ID of the most recent checkpoint for the given NameNodeFile.longAsynchronously get the most recent transaction ID.org.apache.hadoop.hdfs.server.protocol.NamespaceInfoAsynchronously request name-node version and storage information.Methods inherited from class org.apache.hadoop.hdfs.server.federation.router.RouterNamenodeProtocol
endCheckpoint, errorReport, getEditLogManifest, getNextSPSPath, isRollingUpgrade, isUpgradeFinalized, registerSubordinateNamenode, rollEditLog, startCheckpoint
-
Constructor Details
-
RouterAsyncNamenodeProtocol
-
-
Method Details
-
getBlocks
public org.apache.hadoop.hdfs.server.protocol.BlocksWithLocations getBlocks(org.apache.hadoop.hdfs.protocol.DatanodeInfo datanode, long size, long minBlockSize, long hotBlockTimeInterval, org.apache.hadoop.fs.StorageType storageType) throws IOException Asynchronously get a list of blocks belonging todatanodewhose total size equalssize.- Specified by:
getBlocksin interfaceorg.apache.hadoop.hdfs.server.protocol.NamenodeProtocol- Overrides:
getBlocksin classRouterNamenodeProtocol- Parameters:
datanode- a data nodesize- requested sizeminBlockSize- each block should be of this minimum Block SizehotBlockTimeInterval- prefer to get blocks which are belong to the cold files accessed before the time intervalstorageType- the given storage typeStorageType- Returns:
- BlocksWithLocations a list of blocks & their locations
- Throws:
IOException- if size is less than or equal to 0 or datanode does not exist- See Also:
-
Balancer
-
getBlockKeys
public org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys getBlockKeys() throws IOExceptionAsynchronously get the current block keys.- Specified by:
getBlockKeysin interfaceorg.apache.hadoop.hdfs.server.protocol.NamenodeProtocol- Overrides:
getBlockKeysin classRouterNamenodeProtocol- Returns:
- ExportedBlockKeys containing current block keys
- Throws:
IOException- if there is no namespace available or other ioExceptions.
-
getTransactionID
Asynchronously get the most recent transaction ID.- Specified by:
getTransactionIDin interfaceorg.apache.hadoop.hdfs.server.protocol.NamenodeProtocol- Overrides:
getTransactionIDin classRouterNamenodeProtocol- Returns:
- The most recent transaction ID that has been synced to persistent storage, or applied from persistent storage in the case of a non-active node.
- Throws:
IOException- if there is no namespace available or other ioExceptions.
-
getMostRecentCheckpointTxId
Asynchronously get the transaction ID of the most recent checkpoint.- Specified by:
getMostRecentCheckpointTxIdin interfaceorg.apache.hadoop.hdfs.server.protocol.NamenodeProtocol- Overrides:
getMostRecentCheckpointTxIdin classRouterNamenodeProtocol- Returns:
- The transaction ID of the most recent checkpoint.
- Throws:
IOException- if there is no namespace available or other ioExceptions.
-
getMostRecentNameNodeFileTxId
public long getMostRecentNameNodeFileTxId(org.apache.hadoop.hdfs.server.namenode.NNStorage.NameNodeFile nnf) throws IOException Asynchronously get the transaction ID of the most recent checkpoint for the given NameNodeFile.- Specified by:
getMostRecentNameNodeFileTxIdin interfaceorg.apache.hadoop.hdfs.server.protocol.NamenodeProtocol- Overrides:
getMostRecentNameNodeFileTxIdin classRouterNamenodeProtocol- Returns:
- The transaction ID of the most recent checkpoint for the given NameNodeFile.
- Throws:
IOException- if there is no namespace available or other ioExceptions.
-
versionRequest
Asynchronously request name-node version and storage information.- Specified by:
versionRequestin interfaceorg.apache.hadoop.hdfs.server.protocol.NamenodeProtocol- Overrides:
versionRequestin classRouterNamenodeProtocol- Returns:
NamespaceInfoidentifying versions and storage information of the name-node.- Throws:
IOException- if there is no namespace available or other ioExceptions.
-