Class BlockDispatcher
java.lang.Object
org.apache.hadoop.hdfs.server.common.sps.BlockDispatcher
Dispatching block replica moves between datanodes to satisfy the storage
policy.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockDispatcher(int sockTimeout, int ioFileBuffSize, boolean connectToDatanodeViaHostname) Construct block dispatcher details. -
Method Summary
Modifier and TypeMethodDescriptionmoveBlock(BlockStorageMovementCommand.BlockMovingInfo blkMovingInfo, org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient saslClient, org.apache.hadoop.hdfs.protocol.ExtendedBlock eb, Socket sock, org.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataEncryptionKeyFactory km, org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> accessToken) Moves the given block replica to the given target node and wait for the response.
-
Constructor Details
-
BlockDispatcher
public BlockDispatcher(int sockTimeout, int ioFileBuffSize, boolean connectToDatanodeViaHostname) Construct block dispatcher details.- Parameters:
sockTimeout- soTimeoutioFileBuffSize- file io buffer sizeconnectToDatanodeViaHostname- true represents connect via hostname, false otw
-
-
Method Details
-
moveBlock
public BlockMovementStatus moveBlock(BlockStorageMovementCommand.BlockMovingInfo blkMovingInfo, org.apache.hadoop.hdfs.protocol.datatransfer.sasl.SaslDataTransferClient saslClient, org.apache.hadoop.hdfs.protocol.ExtendedBlock eb, Socket sock, org.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataEncryptionKeyFactory km, org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> accessToken) throws IOException Moves the given block replica to the given target node and wait for the response.- Parameters:
blkMovingInfo- block to storage infosaslClient- SASL for DataTransferProtocol on behalf of a clienteb- extended block infosock- target node's socketkm- for creation of an encryption keyaccessToken- connection block access token- Returns:
- status of the block movement
- Throws:
IOException
-