Package | Description |
---|---|
org.apache.hadoop.hdfs.server.blockmanagement | |
org.apache.hadoop.hdfs.server.namenode |
Modifier and Type | Class and Description |
---|---|
class |
BlockInfoUnderConstruction
Represents a block that is currently being constructed.
This is usually the last block of a file opened for write or append. |
Modifier and Type | Field and Description |
---|---|
static BlockInfo[] |
BlockInfo.EMPTY_ARRAY |
Modifier and Type | Method and Description |
---|---|
BlockInfo |
BlockManager.addBlockCollection(BlockInfo block,
BlockCollection bc) |
BlockInfo |
BlockManager.forceCompleteBlock(MutableBlockCollection bc,
BlockInfoUnderConstruction block)
Force the given block in the given file to be marked as complete,
regardless of whether enough replicas are present.
|
BlockInfo[] |
BlockCollection.getBlocks()
Get the blocks.
|
protected BlockInfo |
DatanodeDescriptor.getHead()
Used for testing only
|
BlockInfo |
BlockCollection.getLastBlock()
Get the last block of the collection.
|
BlockInfo |
BlockManager.getStoredBlock(Block block) |
BlockInfo |
BlockInfo.listInsert(BlockInfo head,
DatanodeDescriptor dn)
Insert this block into the head of the list of blocks
related to the specified DatanodeDescriptor.
|
BlockInfo |
BlockInfo.listRemove(BlockInfo head,
DatanodeDescriptor dn)
Remove this block from the list of blocks
related to the specified DatanodeDescriptor.
|
BlockInfo |
BlockInfo.moveBlockToHead(BlockInfo head,
DatanodeDescriptor dn,
int curIndex,
int headIndex)
Remove this block from the list of blocks related to the specified
DatanodeDescriptor.
|
BlockInfo |
DatanodeDescriptor.BlockIterator.next() |
BlockInfo |
DatanodeDescriptor.replaceBlock(BlockInfo oldBlock,
BlockInfo newBlock)
Replace specified old block with a new one in the DataNodeDescriptor.
|
Modifier and Type | Method and Description |
---|---|
Iterator<BlockInfo> |
DatanodeDescriptor.getBlockIterator() |
Modifier and Type | Method and Description |
---|---|
boolean |
DatanodeDescriptor.addBlock(BlockInfo b)
Add datanode to the block.
|
BlockInfo |
BlockManager.addBlockCollection(BlockInfo block,
BlockCollection bc) |
LocatedBlocks |
BlockManager.createLocatedBlocks(BlockInfo[] blocks,
long fileSizeExcludeBlocksUnderConstruction,
boolean isFileUnderConstruction,
long offset,
long length,
boolean needBlockToken,
boolean inSnapshot)
Create a LocatedBlocks.
|
DatanodeDescriptor[] |
BlockManager.getNodes(BlockInfo block) |
BlockInfo |
BlockInfo.listInsert(BlockInfo head,
DatanodeDescriptor dn)
Insert this block into the head of the list of blocks
related to the specified DatanodeDescriptor.
|
BlockInfo |
BlockInfo.listRemove(BlockInfo head,
DatanodeDescriptor dn)
Remove this block from the list of blocks
related to the specified DatanodeDescriptor.
|
BlockInfo |
BlockInfo.moveBlockToHead(BlockInfo head,
DatanodeDescriptor dn,
int curIndex,
int headIndex)
Remove this block from the list of blocks related to the specified
DatanodeDescriptor.
|
boolean |
DatanodeDescriptor.removeBlock(BlockInfo b)
Remove block from the list of blocks belonging to the data-node.
|
BlockInfo |
DatanodeDescriptor.replaceBlock(BlockInfo oldBlock,
BlockInfo newBlock)
Replace specified old block with a new one in the DataNodeDescriptor.
|
void |
MutableBlockCollection.setBlock(int index,
BlockInfo blk)
Set the block at the given index.
|
BlockInfoUnderConstruction |
MutableBlockCollection.setLastBlock(BlockInfo lastBlock,
DatanodeDescriptor[] locations)
Convert the last block of the collection to an under-construction block
and set the locations.
|
Constructor and Description |
---|
BlockInfo(BlockInfo from)
Copy construction.
|
Modifier and Type | Method and Description |
---|---|
BlockInfo[] |
INodeFile.getBlocks() |
BlockInfo |
INodeFile.getLastBlock() |
Modifier and Type | Method and Description |
---|---|
void |
INodeFile.setBlock(int idx,
BlockInfo blk)
Set the block of the file at the given index.
|
void |
INodeFile.setBlocks(BlockInfo[] blocks)
Set the blocks.
|
BlockInfoUnderConstruction |
INodeFileUnderConstruction.setLastBlock(BlockInfo lastBlock,
DatanodeDescriptor[] targets)
Convert the last block of the file to an under-construction block.
|
Copyright © 2013 Apache Software Foundation. All rights reserved.