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

    Constructors
    Constructor
    Description
    RecoveringBlock(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 Type
    Method
    Description
    org.apache.hadoop.hdfs.protocol.Block
    Return the new block.
    long
    Return 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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

      public RecoveringBlock(BlockRecoveryCommand.RecoveringBlock rBlock)
  • 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.