|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hdfs.protocol.Block
org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo
org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoUnderConstruction
public class BlockInfoUnderConstruction
Represents a block that is currently being constructed.
This is usually the last block of a file opened for write or append.
| Field Summary |
|---|
| Fields inherited from class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo |
|---|
EMPTY_ARRAY |
| Fields inherited from class org.apache.hadoop.hdfs.protocol.Block |
|---|
BLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo |
|---|
convertToBlockUnderConstruction, getBlockCollection, getCapacity, getDatanode, getNext, isComplete, moveBlockToHead, numNodes, setBlockCollection, setNext |
| Methods inherited from class org.apache.hadoop.hdfs.protocol.Block |
|---|
compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, write, writeId |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
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)
| Method Detail |
|---|
public void setExpectedLocations(DatanodeStorageInfo[] targets)
public DatanodeStorageInfo[] getExpectedStorageLocations()
public int getNumExpectedLocations()
public HdfsServerConstants.BlockUCState getBlockUCState()
getBlockUCState in class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoHdfsServerConstants.BlockUCState.COMPLETEHdfsServerConstants.BlockUCStatepublic 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.BlockInfopublic boolean equals(Object obj)
equals in class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfopublic String toString()
toString in class org.apache.hadoop.hdfs.protocol.Blockpublic void appendStringTo(StringBuilder sb)
appendStringTo in class org.apache.hadoop.hdfs.protocol.Block
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||