[ https://issues.apache.org/jira/browse/HDFS-17028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17727164#comment-17727164 ]
ASF GitHub Bot commented on HDFS-17028: --------------------------------------- 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? > RBF: Optimize debug logs of class ConnectionPool and other related class. > ------------------------------------------------------------------------- > > Key: HDFS-17028 > URL: https://issues.apache.org/jira/browse/HDFS-17028 > Project: Hadoop HDFS > Issue Type: Improvement > Components: rbf > Affects Versions: 3.3.4 > Reporter: farmmamba > Priority: Minor > Labels: pull-request-available > > When we change the log level of RouterRpcClient from INFO to DEBUG to figure > out which connection an user is using. We found logs below: > > {code:java} > 2023-05-29 09:46:09,033 DEBUG > org.apache.hadoop.hdfs.server.federation.router.RouterRpcClient: User someone > NN ANN:8020 is using connection > ClientNamenodeProtocolTranslatorPB@ANN/ANN_IP:8020x3 > 2023-05-29 09:46:09,037 DEBUG > org.apache.hadoop.hdfs.server.federation.router.RouterRpcClient: User someone > NN ANN:8020 is using connection > ClientNamenodeProtocolTranslatorPB@ANN/ANN_IP:8020x1 > 2023-05-29 09:46:09,037 DEBUG > org.apache.hadoop.hdfs.server.federation.router.RouterRpcClient: User someone > NN ANN:8020 is using connection > ClientNamenodeProtocolTranslatorPB@ANN/ANN_IP:8020x2 > 2023-05-29 09:46:09,037 DEBUG > org.apache.hadoop.hdfs.server.federation.router.RouterRpcClient: User someone > NN ANN:8020 is using connection > ClientNamenodeProtocolTranslatorPB@ANN/ANN_IP:8020x3 > 2023-05-29 09:46:09,042 DEBUG > org.apache.hadoop.hdfs.server.federation.router.RouterRpcClient: User someone > NN ANN:8020 is using connection > ClientNamenodeProtocolTranslatorPB@ANN/ANN_IP:8020x0 {code} > It seems not very clear for us to figure out which connection user is using. > Therefore, i think we should optimize the toString method of class > ConnectionContext. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org