[ 
https://issues.apache.org/jira/browse/HDFS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Harsh J resolved HDFS-6.
------------------------

    Resolution: Won't Fix

This is mostly caused by improper host resolution environments (I see this 
cause disallowed exceptions a lot of time on Cloudera's scm-users list, for 
example, where the users have badly formed /etc/hosts files [FQDN second 
instead of first, etc.]).

The most easy fix is to fix your environment to have saner resolution that does 
not lead to this, than having the code resolve it.

I do not see this problem with consistent host resolution setups.

Resolving as Won't Fix, but do reopen if there's a strong point of argument 
here, of why the workaround _has_ to be necessarily done. Patches would be 
welcome in that case too :)
                
> in FSNamesystem.registerDatanode, dnAddress should be resolved (rarely 
> occured)
> -------------------------------------------------------------------------------
>
>                 Key: HDFS-6
>                 URL: https://issues.apache.org/jira/browse/HDFS-6
>             Project: Hadoop HDFS
>          Issue Type: Bug
>         Environment: CentOS 5.2, JDK 1.6
>            Reporter: Wang Xu
>            Priority: Minor
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> In FSNamesystem.java registerDatanode(), if the datanode address cannot be
> got from the RPC Server, it will use that from the datanode report:
>     String dnAddress = Server.getRemoteAddress();
>     if (dnAddress == null) {
>       // Mostly called inside an RPC.
>       // But if not, use address passed by the data-node.
>       dnAddress = nodeReg.getHost();
>     }      
> The getHost() may return the hostname or address, while the 
> Server.getRemoteAddress() 
> will return the IP address, which is the dnAddress should be. Thus I think 
> the it should be
>     if (dnAddress == null) {
>       // Mostly called inside an RPC.
>       // But if not, use address passed by the data-node.
>       dnAddress = InetAddress.getByName(nodeReg.getHost()).getHostAddress();
>     }      
> I know it should not be called in most situation, but I indeed use that, and 
> I suppose the 
> dnAddress should be an IP address.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to