public class BlockInfoContiguousUnderConstruction extends org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguous
| 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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendStringTo(StringBuilder sb) |
boolean |
equals(Object obj) |
long |
getBlockRecoveryId()
Get block recovery ID
|
HdfsServerConstants.BlockUCState |
getBlockUCState()
Return the state of the block under construction.
|
DatanodeStorageInfo[] |
getExpectedStorageLocations()
Create array of expected replica locations
(as has been assigned by chooseTargets()).
|
int |
getNumExpectedLocations()
Get the number of expected locations
|
org.apache.hadoop.hdfs.protocol.Block |
getTruncateBlock()
Get recover block
|
int |
hashCode() |
void |
initializeBlockRecovery(long recoveryId)
Initialize lease recovery for this block.
|
void |
setExpectedLocations(DatanodeStorageInfo[] targets)
Set expected locations
|
void |
setGenerationStampAndVerifyReplicas(long genStamp)
Process the recorded replicas.
|
void |
setTruncateBlock(org.apache.hadoop.hdfs.protocol.Block recoveryBlock) |
String |
toString() |
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 void 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 © 2016 Apache Software Foundation. All Rights Reserved.