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

View File

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