HDFS-9485. Make BlockManager#removeFromExcessReplicateMap accept BlockInfo instead of Block. Contributed by Mingliang Liu.
This commit is contained in:
parent
1cc7e61431
commit
830eb252aa
|
@ -1704,6 +1704,9 @@ Release 2.8.0 - UNRELEASED
|
|||
HDFS-9269. Update the documentation and wrapper for fuse-dfs.
|
||||
(Wei-Chiu Chuang via zhz)
|
||||
|
||||
HDFS-9485. Make BlockManager#removeFromExcessReplicateMap accept BlockInfo
|
||||
instead of Block. (Mingliang Liu via jing9)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||
|
|
|
@ -3930,7 +3930,7 @@ public class BlockManager implements BlockStatsMXBean {
|
|||
return corruptReplicas.numCorruptReplicas(block);
|
||||
}
|
||||
|
||||
public void removeBlockFromMap(Block block) {
|
||||
public void removeBlockFromMap(BlockInfo block) {
|
||||
removeFromExcessReplicateMap(block);
|
||||
blocksMap.removeBlock(block);
|
||||
// If block is removed from blocksMap remove it from corruptReplicasMap
|
||||
|
@ -3940,7 +3940,7 @@ public class BlockManager implements BlockStatsMXBean {
|
|||
/**
|
||||
* If a block is removed from blocksMap, remove it from excessReplicateMap.
|
||||
*/
|
||||
private void removeFromExcessReplicateMap(Block block) {
|
||||
private void removeFromExcessReplicateMap(BlockInfo block) {
|
||||
for (DatanodeStorageInfo info : blocksMap.getStorages(block)) {
|
||||
String uuid = info.getDatanodeDescriptor().getDatanodeUuid();
|
||||
LightWeightHashSet<BlockInfo> excessReplicas =
|
||||
|
|
|
@ -82,7 +82,7 @@ class FSDirWriteFileOp {
|
|||
if (uc == null) {
|
||||
return false;
|
||||
}
|
||||
fsd.getBlockManager().removeBlockFromMap(block);
|
||||
fsd.getBlockManager().removeBlockFromMap(uc);
|
||||
|
||||
if(NameNode.stateChangeLog.isDebugEnabled()) {
|
||||
NameNode.stateChangeLog.debug("DIR* FSDirectory.removeBlock: "
|
||||
|
|
Loading…
Reference in New Issue