[ 
https://issues.apache.org/jira/browse/HADOOP-16793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17016211#comment-17016211
 ] 

Íñigo Goiri commented on HADOOP-16793:
--------------------------------------

Minor style comments:
* No need to have paranthesis around the instanceof, {{if (ex instanceof 
InterruptedIOException) }} is enough.
* We can leverage the logger and make it a single line:
{code}
if (ex instanceof InterruptedIOException) {
  LOG.debug(
      "Exception encountered while connecting to the server", ex);
} else {
  LOG.warn(
      "Exception encountered while connecting to the server", ex);
}
{code}

> Redefine log level when ipc connection interrupted in 
> Client#handleSaslConnectionFailure()
> ------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-16793
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16793
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Lisheng Sun
>            Priority: Minor
>         Attachments: HADOOP-16793.001.patch, HADOOP-16793.002.patch
>
>
> log info:
> {code:java}
> // Some comments here
> 2020-01-07,15:01:17,816 WARN org.apache.hadoop.ipc.Client: Exception 
> encountered while connecting to the server : java.io.InterruptedIOException: 
> Interrupted while waiting for IO on channel 
> java.nio.channels.SocketChannel[connected local=/10.75.13.227:50415 
> remote=mb2-hadoop-prc-ct06.awsind/10.75.15.99:11230]. 60000 millis timeout 
> left
> {code}
> With RequestHedgingProxyProvider, one rpc call will send multiple requests to 
> all namenodes. After one request return successfully,  all other requests 
> will be interrupted. It's not a big problem and should not print a warning 
> log.
> {code:java}
> private synchronized void handleSaslConnectionFailure(
> ....
> LOG.warn("Exception encountered while connecting to "
>         + "the server : " + ex);
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to