Class BlockStorageMovementCommand
java.lang.Object
org.apache.hadoop.hdfs.server.protocol.ServerCommand
org.apache.hadoop.hdfs.server.protocol.DatanodeCommand
org.apache.hadoop.hdfs.server.protocol.BlockStorageMovementCommand
A BlockStorageMovementCommand is an instruction to a DataNode to move the
given set of blocks to specified target DataNodes to fulfill the block
storage policy.
Upon receiving this command, this DataNode pass the array of block movement
details to
ExternalSPSBlockMoveTaskHandler
service. Later, ExternalSPSBlockMoveTaskHandler will schedule block movement
tasks for these blocks and monitors the completion of each task. After the
block movement attempt is finished(with success or failure) this DataNode
will send response back to NameNode about the block movement attempt
finished details.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStores block to storage info that can be used for block movement. -
Constructor Summary
ConstructorsConstructorDescriptionBlockStorageMovementCommand(int action, String blockPoolId, Collection<BlockStorageMovementCommand.BlockMovingInfo> blockMovingInfos) Block storage movement command constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of blocks to be moved.Returns block pool ID.Methods inherited from class org.apache.hadoop.hdfs.server.protocol.ServerCommand
getAction, toString
-
Constructor Details
-
BlockStorageMovementCommand
public BlockStorageMovementCommand(int action, String blockPoolId, Collection<BlockStorageMovementCommand.BlockMovingInfo> blockMovingInfos) Block storage movement command constructor.- Parameters:
action- protocol specific actionblockMovingInfos- block to storage info that will be used for movement
-
-
Method Details
-
getBlockPoolId
Returns block pool ID. -
getBlockMovingTasks
Returns the list of blocks to be moved.
-