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 b20bc668d5
commit 43db94c7a3
1 changed files with 6 additions and 3 deletions

View File

@ -2794,9 +2794,12 @@ public class BlockManager implements BlockStatsMXBean {
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