org.apache.hadoop.hdfs.server.protocol
Class BlockRecoveryCommand.RecoveringBlock

java.lang.Object
  extended by org.apache.hadoop.hdfs.protocol.LocatedBlock
      extended by org.apache.hadoop.hdfs.server.protocol.BlockRecoveryCommand.RecoveringBlock
All Implemented Interfaces:
org.apache.hadoop.io.Writable
Enclosing class:
BlockRecoveryCommand

@InterfaceAudience.Private
@InterfaceStability.Evolving
public static class BlockRecoveryCommand.RecoveringBlock
extends 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
BlockRecoveryCommand.RecoveringBlock()
          Create empty RecoveringBlock.
BlockRecoveryCommand.RecoveringBlock(Block b, DatanodeInfo[] locs, long newGS)
          Create RecoveringBlock.
 
Method Summary
 long getNewGenerationStamp()
          Return the new generation stamp of the block, which also plays role of the recovery id.
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hdfs.protocol.LocatedBlock
getAccessToken, getBlock, getBlockSize, getLocations, getStartOffset, isCorrupt, read, setAccessToken, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlockRecoveryCommand.RecoveringBlock

public BlockRecoveryCommand.RecoveringBlock()
Create empty RecoveringBlock.


BlockRecoveryCommand.RecoveringBlock

public BlockRecoveryCommand.RecoveringBlock(Block b,
                                            DatanodeInfo[] locs,
                                            long newGS)
Create RecoveringBlock.

Method Detail

getNewGenerationStamp

public long getNewGenerationStamp()
Return the new generation stamp of the block, which also plays role of the recovery id.


write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class LocatedBlock
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class LocatedBlock
Throws:
IOException


Copyright © 2009 The Apache Software Foundation