HDFS-16833. NameNode should log internal EC blocks instead of the EC block group when it receives block reports. (#5106)

Reviewed-by: Tao Li <tomscut@apache.org>
This commit is contained in:
Takanobu Asanuma 2022-11-07 10:49:48 +09:00 committed by GitHub
parent 5d6ab15860
commit 660530205e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -3616,7 +3616,7 @@ public class BlockManager implements BlockStatsMXBean {
if (storedBlock == null || storedBlock.isDeleted()) { if (storedBlock == null || storedBlock.isDeleted()) {
// If this block does not belong to anyfile, then we are done. // If this block does not belong to anyfile, then we are done.
blockLog.debug("BLOCK* addStoredBlock: {} on {} size {} but it does not belong to any file", blockLog.debug("BLOCK* addStoredBlock: {} on {} size {} but it does not belong to any file",
block, node, block.getNumBytes()); reportedBlock, node, reportedBlock.getNumBytes());
// we could add this block to invalidate set of this datanode. // we could add this block to invalidate set of this datanode.
// it will happen in next block report otherwise. // it will happen in next block report otherwise.
return block; return block;
@ -3631,12 +3631,12 @@ public class BlockManager implements BlockStatsMXBean {
(node.isDecommissioned() || node.isDecommissionInProgress()) ? 0 : 1; (node.isDecommissioned() || node.isDecommissionInProgress()) ? 0 : 1;
if (logEveryBlock) { if (logEveryBlock) {
blockLog.info("BLOCK* addStoredBlock: {} is added to {} (size={})", blockLog.info("BLOCK* addStoredBlock: {} is added to {} (size={})",
node, storedBlock, storedBlock.getNumBytes()); node, reportedBlock, reportedBlock.getNumBytes());
} }
} else if (result == AddBlockResult.REPLACED) { } else if (result == AddBlockResult.REPLACED) {
curReplicaDelta = 0; curReplicaDelta = 0;
blockLog.warn("BLOCK* addStoredBlock: block {} moved to storageType " + blockLog.warn("BLOCK* addStoredBlock: block {} moved to storageType " +
"{} on node {}", storedBlock, storageInfo.getStorageType(), node); "{} on node {}", reportedBlock, storageInfo.getStorageType(), node);
} else { } else {
// if the same block is added again and the replica was corrupt // if the same block is added again and the replica was corrupt
// previously because of a wrong gen stamp, remove it from the // previously because of a wrong gen stamp, remove it from the
@ -3646,8 +3646,8 @@ public class BlockManager implements BlockStatsMXBean {
curReplicaDelta = 0; curReplicaDelta = 0;
if (blockLog.isDebugEnabled()) { if (blockLog.isDebugEnabled()) {
blockLog.debug("BLOCK* addStoredBlock: Redundant addStoredBlock request" blockLog.debug("BLOCK* addStoredBlock: Redundant addStoredBlock request"
+ " received for {} on node {} size {}", storedBlock, node, + " received for {} on node {} size {}", reportedBlock, node,
storedBlock.getNumBytes()); reportedBlock.getNumBytes());
} }
} }