public class BlockInfoUnderConstruction extends BlockInfo
EMPTY_ARRAY
BLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern
Constructor and Description |
---|
BlockInfoUnderConstruction(Block blk,
int replication)
Create block and set its state to
HdfsServerConstants.BlockUCState.UNDER_CONSTRUCTION . |
BlockInfoUnderConstruction(Block blk,
int replication,
HdfsServerConstants.BlockUCState state,
DatanodeDescriptor[] 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.
|
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(DatanodeDescriptor[] targets)
Set expected locations
|
String |
toString() |
addNode, convertToBlockUnderConstruction, getBlockCollection, getNext, isComplete, listInsert, listRemove, moveBlockToHead, numNodes, removeNode, setBlockCollection, setNext
compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, write, writeId
public BlockInfoUnderConstruction(Block blk, int replication)
HdfsServerConstants.BlockUCState.UNDER_CONSTRUCTION
.public BlockInfoUnderConstruction(Block blk, int replication, HdfsServerConstants.BlockUCState state, DatanodeDescriptor[] targets)
public void setExpectedLocations(DatanodeDescriptor[] targets)
public DatanodeDescriptor[] getExpectedLocations()
public int getNumExpectedLocations()
public HdfsServerConstants.BlockUCState getBlockUCState()
getBlockUCState
in class BlockInfo
HdfsServerConstants.BlockUCState.COMPLETE
HdfsServerConstants.BlockUCState
public long getBlockRecoveryId()
public void initializeBlockRecovery(long recoveryId)
public void appendStringTo(StringBuilder sb)
appendStringTo
in class Block
Copyright © 2013 Apache Software Foundation. All rights reserved.