|
||||||||||
| 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
public class BlockInfo
Internal class for block metadata.
| Field Summary |
|---|
| Fields inherited from class org.apache.hadoop.hdfs.protocol.Block |
|---|
BLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern |
| Constructor Summary | |
|---|---|
protected |
BlockInfo(BlockInfo from)
Copy construction. |
|
BlockInfo(org.apache.hadoop.hdfs.protocol.Block blk,
int replication)
|
|
BlockInfo(int replication)
Construct an entry for blocksmap |
| Method Summary | |
|---|---|
boolean |
addNode(org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor node)
Add data-node this block belongs to. |
BlockInfoUnderConstruction |
convertToBlockUnderConstruction(HdfsServerConstants.BlockUCState s,
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] targets)
Convert a complete block to an under construction block. |
boolean |
equals(Object obj)
|
HdfsServerConstants.BlockUCState |
getBlockUCState()
BlockInfo represents a block that is not being constructed. |
INodeFile |
getINode()
|
LightWeightGSet.LinkedElement |
getNext()
Get the next element. |
int |
hashCode()
|
boolean |
isComplete()
Is this block complete? |
BlockInfo |
listInsert(BlockInfo head,
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor dn)
Insert this block into the head of the list of blocks related to the specified DatanodeDescriptor. |
BlockInfo |
listRemove(BlockInfo head,
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor dn)
Remove this block from the list of blocks related to the specified DatanodeDescriptor. |
boolean |
removeNode(org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor node)
Remove data-node from the block. |
void |
setINode(INodeFile inode)
|
void |
setNext(LightWeightGSet.LinkedElement next)
Set the next element. |
| Methods inherited from class org.apache.hadoop.hdfs.protocol.Block |
|---|
compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, toString, write, writeId |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BlockInfo(int replication)
replication - the block's replication factor
public BlockInfo(org.apache.hadoop.hdfs.protocol.Block blk,
int replication)
protected BlockInfo(BlockInfo from)
from - BlockInfo to copy from.| Method Detail |
|---|
public INodeFile getINode()
public void setINode(INodeFile inode)
public boolean addNode(org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor node)
public boolean removeNode(org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor node)
public BlockInfo listInsert(BlockInfo head,
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor dn)
public BlockInfo listRemove(BlockInfo head,
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor dn)
public HdfsServerConstants.BlockUCState getBlockUCState()
BlockInfoUnderConstruction.
HdfsServerConstants.BlockUCState.COMPLETEpublic boolean isComplete()
HdfsServerConstants.BlockUCState.COMPLETE
public BlockInfoUnderConstruction convertToBlockUnderConstruction(HdfsServerConstants.BlockUCState s,
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] targets)
public int hashCode()
hashCode in class org.apache.hadoop.hdfs.protocol.Blockpublic boolean equals(Object obj)
equals in class org.apache.hadoop.hdfs.protocol.Blockpublic LightWeightGSet.LinkedElement getNext()
LightWeightGSet.LinkedElement
getNext in interface LightWeightGSet.LinkedElementpublic void setNext(LightWeightGSet.LinkedElement next)
LightWeightGSet.LinkedElement
setNext in interface LightWeightGSet.LinkedElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||