public class BlockInfoUnderConstruction extends 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,
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] targets)
Create a block that is currently being constructed.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
long |
getBlockRecoveryId()
Get block recovery ID
|
HdfsServerConstants.BlockUCState |
getBlockUCState()
Return the state of the block under construction.
|
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] |
getExpectedLocations()
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(org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] targets)
Set expected locations
|
void |
setGenerationStampAndVerifyReplicas(long genStamp)
Process the recorded replicas.
|
String |
toString() |
addNode, convertToBlockUnderConstruction, getINode, getNext, isComplete, listInsert, listRemove, moveBlockToHead, removeNode, setINode, setNextpublic 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, org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] targets)
public void setExpectedLocations(org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] targets)
public org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] getExpectedLocations()
public int getNumExpectedLocations()
public HdfsServerConstants.BlockUCState getBlockUCState()
getBlockUCState in class BlockInfoHdfsServerConstants.BlockUCState.COMPLETEHdfsServerConstants.BlockUCStatepublic long getBlockRecoveryId()
public void setGenerationStampAndVerifyReplicas(long genStamp)
genStamp - The final generation stamp for the block.public void initializeBlockRecovery(long recoveryId)
Copyright © 2013 Apache Software Foundation. All Rights Reserved.