public class BlockInfoUnderConstruction extends org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo
Constructor and Description |
---|
BlockInfoUnderConstruction(org.apache.hadoop.hdfs.protocol.Block blk,
int replication)
Create block and set its state to
HdfsServerConstants.BlockUCState.UNDER_CONSTRUCTION . |
BlockInfoUnderConstruction(org.apache.hadoop.hdfs.protocol.Block blk,
int 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
|
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.
|
String |
toString() |
convertToBlockUnderConstruction, getBlockCollection, getCapacity, getDatanode, getNext, isComplete, moveBlockToHead, numNodes, setBlockCollection, setNext
compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, write, writeId
public BlockInfoUnderConstruction(org.apache.hadoop.hdfs.protocol.Block blk, int replication)
HdfsServerConstants.BlockUCState.UNDER_CONSTRUCTION
.public BlockInfoUnderConstruction(org.apache.hadoop.hdfs.protocol.Block blk, int 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.BlockInfo
HdfsServerConstants.BlockUCState.COMPLETE
HdfsServerConstants.BlockUCState
public long getBlockRecoveryId()
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.BlockInfo
public boolean equals(Object obj)
equals
in class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo
public String toString()
toString
in class org.apache.hadoop.hdfs.protocol.Block
public void appendStringTo(StringBuilder sb)
appendStringTo
in class org.apache.hadoop.hdfs.protocol.Block
Copyright © 2014 Apache Software Foundation. All Rights Reserved.