| Package | Description |
|---|---|
| org.apache.hadoop.hdfs.server.blockmanagement | |
| org.apache.hadoop.hdfs.server.namenode | |
| org.apache.hadoop.hdfs.server.namenode.snapshot |
| Modifier and Type | Class | Description |
|---|---|---|
class |
BlockInfoContiguous |
Subclass of
BlockInfo, used for a block with replication scheme. |
class |
BlockInfoStriped |
Subclass of
BlockInfo, presenting a block group in erasure coding. |
| Modifier and Type | Field | Description |
|---|---|---|
static BlockInfo[] |
BlockInfo.EMPTY_ARRAY |
| Modifier and Type | Method | Description |
|---|---|---|
BlockInfo |
BlockManager.addBlockCollection(BlockInfo block,
BlockCollection bc) |
|
BlockInfo |
BlockManager.addBlockCollectionWithCheck(BlockInfo block,
BlockCollection bc) |
Do some check when adding a block to blocksmap.
|
BlockInfo[] |
BlockCollection.getBlocks() |
Get the blocks (striped or contiguous).
|
BlockInfo |
BlockCollection.getLastBlock() |
Get the last block of the collection.
|
BlockInfo[] |
DatanodeDescriptor.getLeaseRecoveryCommand(int maxTransfers) |
|
BlockInfo |
BlockManager.getStoredBlock(org.apache.hadoop.hdfs.protocol.Block block) |
|
BlockInfo |
BlockUnderConstructionFeature.getTruncateBlock() |
Get recover block
|
BlockInfo |
BlockInfo.moveBlockToHead(BlockInfo head,
DatanodeStorageInfo storage,
int curIndex,
int headIndex) |
Remove this block from the list of blocks related to the specified
DatanodeDescriptor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Iterator<BlockInfo> |
BlockManager.getCorruptReplicaBlockIterator() |
Return an iterator over the set of blocks for which there are no replicas.
|
java.util.concurrent.ConcurrentLinkedQueue<java.util.List<BlockInfo>> |
BlockManager.getMarkedDeleteQueue() |
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeStorageInfo.AddBlockResult |
DatanodeStorageInfo.addBlock(BlockInfo b,
org.apache.hadoop.hdfs.protocol.Block reportedBlock) |
|
BlockInfo |
BlockManager.addBlockCollection(BlockInfo block,
BlockCollection bc) |
|
BlockInfo |
BlockManager.addBlockCollectionWithCheck(BlockInfo block,
BlockCollection bc) |
Do some check when adding a block to blocksmap.
|
boolean |
BlockManager.addBlockRecoveryAttempt(BlockInfo b) |
Checks whether a recovery attempt has been made for the given block.
|
void |
BlockManager.addExpectedReplicasToPending(BlockInfo blk) |
If IBR is not sent from expected locations yet, add the datanodes to
pendingReconstruction in order to keep RedundancyMonitor from scheduling
the block.
|
void |
BlockCollection.convertLastBlockToUC(BlockInfo lastBlock,
DatanodeStorageInfo[] targets) |
Convert the last block of the collection to an under-construction block
and set the locations.
|
NumberReplicas |
BlockManager.countNodes(BlockInfo b) |
Return the number of nodes hosting a given block, grouped
by the state of those replicas.
|
org.apache.hadoop.hdfs.protocol.LocatedBlocks |
BlockManager.createLocatedBlocks(BlockInfo[] blocks,
long fileSizeExcludeBlocksUnderConstruction,
boolean isFileUnderConstruction,
long offset,
long length,
boolean needBlockToken,
boolean inSnapshot,
org.apache.hadoop.fs.FileEncryptionInfo feInfo,
org.apache.hadoop.hdfs.protocol.ErasureCodingPolicy ecPolicy) |
Create a LocatedBlocks.
|
void |
BlockManager.forceCompleteBlock(BlockInfo block) |
Force the given block in the given file to be marked as complete,
regardless of whether enough replicas are present.
|
int |
BlockManager.getDefaultStorageNum(BlockInfo block) |
|
short |
BlockManager.getExpectedLiveRedundancyNum(BlockInfo block,
NumberReplicas numberReplicas) |
|
short |
BlockManager.getExpectedRedundancyNum(BlockInfo block) |
|
short |
BlockManager.getMinStorageNum(BlockInfo block) |
|
DatanodeStorageInfo[] |
BlockManager.getStorages(BlockInfo block) |
|
boolean |
BlockManager.hasMinStorage(BlockInfo block) |
|
boolean |
BlockManager.hasMinStorage(BlockInfo block,
int liveNum) |
|
void |
BlockUnderConstructionFeature.initializeBlockRecovery(BlockInfo blockInfo,
long recoveryId,
boolean startRecovery) |
Initialize lease recovery for this block.
|
void |
DatanodeStorageInfo.insertToList(BlockInfo b) |
|
boolean |
BlockManager.isExcess(DatanodeDescriptor dn,
BlockInfo blk) |
|
protected boolean |
DatanodeAdminManager.isSufficient(BlockInfo block,
BlockCollection bc,
NumberReplicas numberReplicas,
boolean isDecommission,
boolean isMaintenance) |
Checks whether a block is sufficiently replicated/stored for
DECOMMISSION_INPROGRESS or ENTERING_MAINTENANCE datanodes.
|
boolean |
BlockManager.isSufficientlyReplicated(BlockInfo b) |
Check if a block is replicated to at least the minimum replication.
|
protected void |
DatanodeAdminManager.logBlockReplicationInfo(BlockInfo block,
BlockCollection bc,
DatanodeDescriptor srcNode,
NumberReplicas num,
java.lang.Iterable<DatanodeStorageInfo> storages) |
|
void |
BlockManager.markBlockReplicasAsCorrupt(org.apache.hadoop.hdfs.protocol.Block oldBlock,
BlockInfo block,
long oldGenerationStamp,
long oldNumBytes,
DatanodeStorageInfo[] newStorages) |
Mark block replicas as corrupt except those on the storages in
newStorages list.
|
BlockInfo |
BlockInfo.moveBlockToHead(BlockInfo head,
DatanodeStorageInfo storage,
int curIndex,
int headIndex) |
Remove this block from the list of blocks related to the specified
DatanodeDescriptor.
|
static org.apache.hadoop.hdfs.protocol.LocatedBlock |
BlockManager.newLocatedBlock(org.apache.hadoop.hdfs.protocol.ExtendedBlock eb,
BlockInfo info,
DatanodeStorageInfo[] locs,
long offset) |
|
void |
BlockManager.removeBlock(BlockInfo block) |
|
void |
BlockManager.removeBlockFromMap(BlockInfo block) |
|
void |
BlockManager.removeStoredBlock(BlockInfo storedBlock,
DatanodeDescriptor node) |
Modify (block-->datanode) map.
|
void |
BlockCollection.setBlock(int index,
BlockInfo blk) |
Set the block (contiguous or striped) at the given index.
|
void |
BlockManager.setReplication(short oldRepl,
short newRepl,
BlockInfo b) |
Set replication for the blocks.
|
void |
BlockUnderConstructionFeature.setTruncateBlock(BlockInfo recoveryBlock) |
|
void |
BlockManager.successfulBlockRecovery(BlockInfo block) |
Notification of a successful block recovery.
|
void |
BlockManager.updateLastBlock(BlockInfo lastBlock,
org.apache.hadoop.hdfs.protocol.ExtendedBlock newBlock) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
BlockManager.addBLocksToMarkedDeleteQueue(java.util.List<BlockInfo> blockInfos) |
|
int |
BlockManager.processMisReplicatedBlocks(java.util.List<BlockInfo> blocks) |
Schedule replication work for a specified list of mis-replicated
blocks and return total number of blocks scheduled for replication.
|
| Modifier and Type | Method | Description |
|---|---|---|
BlockInfo |
INode.BlocksMapUpdateInfo.UpdatedReplicationInfo.block() |
|
BlockInfo[] |
INodeFile.getBlocks() |
|
BlockInfo[] |
INodeFile.getBlocks(int snapshot) |
|
BlockInfo |
INodeFile.getLastBlock() |
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<BlockInfo> |
INode.BlocksMapUpdateInfo.getToDeleteList() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
INode.BlocksMapUpdateInfo.addDeleteBlock(BlockInfo toDelete) |
Add a to-be-deleted block into the
INode.BlocksMapUpdateInfo.toDeleteList |
void |
INode.BlocksMapUpdateInfo.addUpdateReplicationFactor(BlockInfo block,
short targetRepl) |
|
void |
INodeFile.collectBlocksBeyondSnapshot(BlockInfo[] snapshotBlocks,
INode.BlocksMapUpdateInfo collectedBlocks) |
This function is only called when block list is stored in snapshot
diffs.
|
void |
INodeFile.convertLastBlockToUC(BlockInfo lastBlock,
DatanodeStorageInfo[] locations) |
|
void |
INodeFile.setBlock(int index,
BlockInfo blk) |
|
void |
FSDirectory.updateSpaceForCompleteBlock(BlockInfo completeBlk,
INodesInPath inodes) |
Update the cached quota space for a block that is being completed.
|
| Modifier and Type | Method | Description |
|---|---|---|
long |
INodeFile.collectBlocksBeyondMax(long max,
INode.BlocksMapUpdateInfo collectedBlocks,
java.util.Set<BlockInfo> toRetain) |
Remove full blocks at the end file up to newLength
|
| Constructor | Description |
|---|---|
UpdatedReplicationInfo(short targetReplication,
BlockInfo block) |
| Modifier and Type | Method | Description |
|---|---|---|
BlockInfo[] |
FileDiffList.findEarlierSnapshotBlocks(int snapshotId) |
|
BlockInfo[] |
FileDiffList.findLaterSnapshotBlocks(int snapshotId) |
|
BlockInfo[] |
FileDiff.getBlocks() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
FileDiff.setBlocks(BlockInfo[] blocks) |
Copy block references into the snapshot
up to the current
FileDiff.fileSize. |
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.