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

Jonathan Eagles commented on HADOOP-11387:
------------------------------------------

A couple of things.

1) The performance of this CacheLoader is several orders of magnitude worse 
than the concurrent library for our use case. Have a look at TEZ-1526 to see my 
earlier concerns with the performance and memory concerns over using this guava 
library in Hadoop.

2) The purpose by looking at the summary and description of this change is to 
make something simpler, but you say that it blocks a clean jenkins run above. 
That is not documented in this jira. If there is truly a simplification jira 
then this shouldn't block a clean jenkins build. Can you please comment on this.


> Simplify NetUtils#canonicalizeHost()
> ------------------------------------
>
>                 Key: HADOOP-11387
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11387
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Haohui Mai
>            Assignee: Li Lu
>         Attachments: HADOOP-11387-121514-1.patch, 
> HADOOP-11387-121514-2.patch, HADOOP-11387-121514.patch
>
>
> Currently {{NetUtils#canonicalizeHost}} uses a {{ConcurrentHashMap}} to cache 
> the canonicalized hostname.
> {code}
>   private static String canonicalizeHost(String host) {
>     // check if the host has already been canonicalized
>     String fqHost = canonicalizedHostCache.get(host);
>     if (fqHost == null) {
>       try {
>         fqHost = SecurityUtil.getByName(host).getHostName();
>         // slight race condition, but won't hurt
>         canonicalizedHostCache.put(host, fqHost);
>       } catch (UnknownHostException e) {
>         fqHost = host;
>       }
>     }
>     return fqHost;
>   }
> {code}
> The code can be simplified using {{CacheMap}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to