HDFS-16003. ProcessReport print invalidatedBlocks should judge debug level at first. Contributed by lei w.

This commit is contained in:
Ayush Saxena 2021-05-10 17:09:51 +05:30
parent 6d6766bc22
commit 359c0c1d1e
1 changed files with 6 additions and 3 deletions

View File

@ -2831,9 +2831,12 @@ public boolean processReport(final DatanodeID nodeID,
namesystem.writeUnlock();
}
if(blockLog.isDebugEnabled()) {
for (Block b : invalidatedBlocks) {
blockLog.debug("BLOCK* processReport 0x{}: {} on node {} size {} does not"
+ " belong to any file", strBlockReportId, b, node, b.getNumBytes());
blockLog.debug("BLOCK* processReport 0x{}: {} on node {} size {} " +
"does not belong to any file.", strBlockReportId, b,
node, b.getNumBytes());
}
}
// Log the block report processing stats from Namenode perspective