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

Jitendra Nath Pandey commented on HADOOP-7314:
----------------------------------------------

A few comments:
1. CachedDNSToSwitchMapping.java#resolve : check for names.isEmpty() is done 
twice.
2. CachedDNSToSwitchMapping.java#getCachedHosts: The comment "now everything is 
in the cache" can be removed now as it is a separate method or put it in 
javadoc if that's what this method expects. On the same note, the comment 
"resolve all or nothing" semantics can also be added to the javadoc. It seems 
to me the two comments are related.
3. TestScriptBasedMapping.java: I think topology.script.file.name is deprecated 
now, instead use ScriptBasedMapping.SCRIPT_FILENAME_KEY which is already being 
used in the test.

Otherwise the patch looks good.

> Add support for throwing UnknownHostException when a host doesn't resolve
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-7314
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7314
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.23.0
>            Reporter: Jeffrey Naisbitt
>            Assignee: Jeffrey Naisbitt
>         Attachments: HADOOP-7314-v2.patch, HADOOP-7314.patch
>
>
> As part of MAPREDUCE-2489, we need support for having the resolve methods 
> (for DNS mapping) throw UnknownHostExceptions.  (Currently, they hide the 
> exception).  Since the existing 'resolve' method is ultimately used by 
> several other locations/components, I propose we add a new 
> 'resolveValidHosts' method.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to