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

Roman Novachenko commented on FLUME-2409:
-----------------------------------------

I see two ways of fixing this:
* in {{NettyAvroRpcClient.toString()}} replace a call to {{getHostName()}} with 
{{getHostString()}} - this would show the host name if it was passed to the 
NettyAvroRpcClient.configure(), and the IP address otherwise.
* remove the {{NettyAvroRpcClient.toString()}} method, and remove {{this}} from 
messages passed to exceptions and loggers. This approach is more consistent 
with other clients in the package, but hides some useful info someone might 
rely on.

Can someone recommend which way is preferred here?

> NettyAvroRpcClient performs unnecessary hostname lookups
> --------------------------------------------------------
>
>                 Key: FLUME-2409
>                 URL: https://issues.apache.org/jira/browse/FLUME-2409
>             Project: Flume
>          Issue Type: Bug
>          Components: Client SDK
>            Reporter: Roman Novachenko
>            Priority: Minor
>         Attachments: FLUME-2409-0.patch
>
>
> When NettyAvroRpcClient works with a host that has only an IP address 
> associated with it but no hostname, some operations take too long (a few 
> seconds vs expected millis). This affects most of exceptions throwing and a 
> part of logging.
> This happens because of the unnecessary and expensive hostname lookup when 
> converting NettyAvroRpcClient to String.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to