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 "goiri (via GitHub)" <gi...@apache.org> on 2023/05/29 17:44:20 UTC

[GitHub] [hadoop] goiri commented on a diff in pull request #5694: HDFS-17028. RBF: Optimize debug logs of class ConnectionPool and other related class.

goiri commented on code in PR #5694:
URL: https://github.com/apache/hadoop/pull/5694#discussion_r1209484172


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/ConnectionContext.java:
##########
@@ -150,8 +150,8 @@ public synchronized void close(boolean force) {
       // this is an erroneous case, but we have to close the connection
       // anyway since there will be connection leak if we don't do so
       // the connection has been moved out of the pool
-      LOG.error("Active connection with {} handlers will be closed",
-          this.numThreads);
+      LOG.error("Active connection with {} handlers will be closed, ConnectionContext is {}",
+          this.numThreads, this.toString());

Review Comment:
   With LOG.error, I think you can just:
   ```
   LOG.error("Active connection with {} handlers will be closed, ConnectionContext is {}",
             this.numThreads, this);
   ```



##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/ConnectionContext.java:
##########
@@ -150,8 +150,8 @@ public synchronized void close(boolean force) {
       // this is an erroneous case, but we have to close the connection
       // anyway since there will be connection leak if we don't do so
       // the connection has been moved out of the pool
-      LOG.error("Active connection with {} handlers will be closed",
-          this.numThreads);
+      LOG.error("Active connection with {} handlers will be closed, ConnectionContext is {}",
+          this.numThreads, this.toString());

Review Comment:
   Can you also show an example of what this would look like?



-- 
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