public class BlockInfoContiguousUnderConstruction extends org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguous
EMPTY_ARRAYBLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern, metaOrBlockFilePattern| Constructor and Description |
|---|
BlockInfoContiguousUnderConstruction(org.apache.hadoop.hdfs.protocol.Block blk,
short replication)
Create block and set its state to
HdfsServerConstants.BlockUCState.UNDER_CONSTRUCTION. |
BlockInfoContiguousUnderConstruction(org.apache.hadoop.hdfs.protocol.Block blk,
short replication,
HdfsServerConstants.BlockUCState state,
DatanodeStorageInfo[] targets)
Create a block that is currently being constructed.
|
convertToBlockUnderConstruction, getBlockCollection, getCapacity, getDatanode, getNext, isComplete, moveBlockToHead, numNodes, setBlockCollection, setNextcompareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, metaToBlockFile, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, write, writeIdpublic BlockInfoContiguousUnderConstruction(org.apache.hadoop.hdfs.protocol.Block blk, short replication)
HdfsServerConstants.BlockUCState.UNDER_CONSTRUCTION.public BlockInfoContiguousUnderConstruction(org.apache.hadoop.hdfs.protocol.Block blk, short replication, HdfsServerConstants.BlockUCState state, DatanodeStorageInfo[] targets)
public void setExpectedLocations(DatanodeStorageInfo[] targets)
public DatanodeStorageInfo[] getExpectedStorageLocations()
public int getNumExpectedLocations()
public HdfsServerConstants.BlockUCState getBlockUCState()
getBlockUCState in class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguousHdfsServerConstants.BlockUCState.COMPLETEHdfsServerConstants.BlockUCStatepublic long getBlockRecoveryId()
public org.apache.hadoop.hdfs.protocol.Block getTruncateBlock()
public void setTruncateBlock(org.apache.hadoop.hdfs.protocol.Block recoveryBlock)
public List<org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguousUnderConstruction.ReplicaUnderConstruction> setGenerationStampAndVerifyReplicas(long genStamp)
genStamp - The final generation stamp for the block.public void initializeBlockRecovery(long recoveryId)
public int hashCode()
hashCode in class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguouspublic boolean equals(Object obj)
equals in class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguouspublic String toString()
toString in class org.apache.hadoop.hdfs.protocol.Blockpublic void appendStringTo(StringBuilder sb)
appendStringTo in class org.apache.hadoop.hdfs.protocol.BlockCopyright © 2018 CERN. All Rights Reserved.