public class BlockInfo extends org.apache.hadoop.hdfs.protocol.Block implements LightWeightGSet.LinkedElement
| Modifier | Constructor and Description |
|---|---|
protected |
BlockInfo(BlockInfo from)
Copy construction.
|
|
BlockInfo(org.apache.hadoop.hdfs.protocol.Block blk,
int replication) |
|
BlockInfo(int replication)
Construct an entry for blocksmap
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
BlockInfo |
moveBlockToHead(BlockInfo head,
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor dn,
int curIndex,
int headIndex)
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.
|
compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, toString, write, writeIdpublic BlockInfo(int replication)
replication - the block's replication factorpublic BlockInfo(org.apache.hadoop.hdfs.protocol.Block blk, int replication)
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 BlockInfo moveBlockToHead(BlockInfo head, org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor dn, int curIndex, int headIndex)
public HdfsServerConstants.BlockUCState getBlockUCState()
BlockInfoUnderConstruction.public boolean isComplete()
HdfsServerConstants.BlockUCState.COMPLETEpublic 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.LinkedElementgetNext in interface LightWeightGSet.LinkedElementpublic void setNext(LightWeightGSet.LinkedElement next)
LightWeightGSet.LinkedElementsetNext in interface LightWeightGSet.LinkedElementCopyright © 2013 Apache Software Foundation. All Rights Reserved.