Class BlockRecoveryCommand
java.lang.Object
org.apache.hadoop.hdfs.server.protocol.ServerCommand
org.apache.hadoop.hdfs.server.protocol.DatanodeCommand
org.apache.hadoop.hdfs.server.protocol.BlockRecoveryCommand
BlockRecoveryCommand is an instruction to a data-node to recover
the specified blocks.
The data-node that receives this command treats itself as a primary
data-node in the recover process.
Block recovery is identified by a recoveryId, which is also the new
generation stamp, which the block will have after the recovery succeeds.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis is a block with locations from which it should be recovered and the new generation stamp, which the block will have after successful recovery.static class -
Constructor Summary
ConstructorsConstructorDescriptionCreate empty BlockRecoveryCommand.BlockRecoveryCommand(int capacity) Create BlockRecoveryCommand with the specified capacity for recovering blocks. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd recovering block to the command.Return the list of recovering blocks.toString()Methods inherited from class org.apache.hadoop.hdfs.server.protocol.ServerCommand
getAction
-
Constructor Details
-
BlockRecoveryCommand
public BlockRecoveryCommand()Create empty BlockRecoveryCommand. -
BlockRecoveryCommand
public BlockRecoveryCommand(int capacity) Create BlockRecoveryCommand with the specified capacity for recovering blocks. -
BlockRecoveryCommand
-
-
Method Details
-
getRecoveringBlocks
Return the list of recovering blocks. -
add
Add recovering block to the command. -
toString
- Overrides:
toStringin classServerCommand
-