You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/12/17 11:15:42 UTC

[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5237: HDFS-16870 HDFS client ip should also be logged when NameNode is processing reportBadBlocks

slfan1989 commented on code in PR #5237:
URL: https://github.com/apache/hadoop/pull/5237#discussion_r1051385874


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -5893,7 +5893,7 @@ void reportBadBlocks(LocatedBlock[] blocks) throws IOException {
         String[] storageIDs = blocks[i].getStorageIDs();
         for (int j = 0; j < nodes.length; j++) {
           NameNode.stateChangeLog.info("*DIR* reportBadBlocks for block: {} on"
-              + " datanode: {}", blk, nodes[j].getXferAddr());
+              + " datanode: {}" + " client: {}", blk, nodes[j].getXferAddr(), Server.getRemoteIp());

Review Comment:
   From my personal point of view, reportBadBlocks should be reported by DN. What does this have to do with the client?  `Server.getRemoteIp()` is somewhat expensive, is there a good enough reason for us to do this? 



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org