ZanderXu commented on code in PR #4529:
URL: https://github.com/apache/hadoop/pull/4529#discussion_r916468348
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java:
##########
@@ -2908,11 +2896,9 @@ public boolean processReport(final DatanodeID nodeID,
if (blockLog.isDebugEnabled()) {
for (Block b : invalidatedBlocks) {
- if (blockLog.isDebugEnabled()) {
- blockLog.debug("BLOCK* processReport 0x{} with lease ID 0x{}: {} on
node {} size {} " +
- "does not belong to any file.", strBlockReportId,
fullBrLeaseId, b,
- node, b.getNumBytes());
- }
+ blockLog.debug("BLOCK* processReport 0x{} with lease ID 0x{}: {} on
node {} size {} " +
Review Comment:
There is already a judgment, so we can remove the internal redundant
judgment.
```
if (blockLog.isDebugEnabled()) {
for (Block b : invalidatedBlocks) {
blockLog.debug("BLOCK* processReport 0x{} with lease ID 0x{}: {} on
node {} size {} " +
"does not belong to any file.", strBlockReportId,
fullBrLeaseId, b,
node, b.getNumBytes());
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]