Class BlockRecoveryCommand.RecoveringBlock
java.lang.Object
org.apache.hadoop.hdfs.protocol.LocatedBlock
org.apache.hadoop.hdfs.server.protocol.BlockRecoveryCommand.RecoveringBlock
- Direct Known Subclasses:
BlockRecoveryCommand.RecoveringStripedBlock
- Enclosing class:
- BlockRecoveryCommand
@Private
@Evolving
public static class BlockRecoveryCommand.RecoveringBlock
extends org.apache.hadoop.hdfs.protocol.LocatedBlock
This is a block with locations from which it should be recovered
and the new generation stamp, which the block will have after
successful recovery.
The new generation stamp of the block, also plays role of the recovery id.
-
Constructor Summary
ConstructorsConstructorDescriptionRecoveringBlock(org.apache.hadoop.hdfs.protocol.ExtendedBlock b, org.apache.hadoop.hdfs.protocol.DatanodeInfo[] locs, long newGS) Create RecoveringBlock.RecoveringBlock(org.apache.hadoop.hdfs.protocol.ExtendedBlock b, org.apache.hadoop.hdfs.protocol.DatanodeInfo[] locs, org.apache.hadoop.hdfs.protocol.Block recoveryBlock) Create RecoveringBlock with copy-on-truncate option. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hdfs.protocol.BlockReturn the new block.longReturn the new generation stamp of the block, which also plays role of the recovery id.Methods inherited from class org.apache.hadoop.hdfs.protocol.LocatedBlock
addCachedLoc, getBlock, getBlockSize, getBlockToken, getBlockType, getCachedLocations, getLocations, getStartOffset, getStorageIDs, getStorageTypes, isCorrupt, isStriped, moveProvidedToEnd, setBlockToken, setCorrupt, setStartOffset, toString, updateCachedStorageInfo
-
Constructor Details
-
RecoveringBlock
public RecoveringBlock(org.apache.hadoop.hdfs.protocol.ExtendedBlock b, org.apache.hadoop.hdfs.protocol.DatanodeInfo[] locs, long newGS) Create RecoveringBlock. -
RecoveringBlock
public RecoveringBlock(org.apache.hadoop.hdfs.protocol.ExtendedBlock b, org.apache.hadoop.hdfs.protocol.DatanodeInfo[] locs, org.apache.hadoop.hdfs.protocol.Block recoveryBlock) Create RecoveringBlock with copy-on-truncate option. -
RecoveringBlock
-
-
Method Details
-
getNewGenerationStamp
public long getNewGenerationStamp()Return the new generation stamp of the block, which also plays role of the recovery id. -
getNewBlock
public org.apache.hadoop.hdfs.protocol.Block getNewBlock()Return the new block.
-