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

Aaron T. Myers commented on HDFS-2979:
--------------------------------------

Hey Uma, I don't think it's reasonable to assume that if HA is enabled for a 
given nameservice ID, that its URI can therefore be determined by getting the 
default URI of the provided conf.

Furthermore, I find it somewhat odd that in Balancer.Cli#run we get the 
InetSocketAddresses of all the NNs, only to convert those back to URIs in the 
NameNodeConnector constructor so we can create RPC proxy objects.

What do you think about the following?

# Instead of enumerating all service RPC addresses of all NNs, enumerate all 
URIs (logical or normal) of all name services.
# Remove the need to convert from inet address -> URI in NameNodeConnector(...).

Also, while looking into this issue, I realized that the 
ConfiguredFailoverProxyProvider won't use the NN RPC service address if it's 
set, even when creating a proxy object for the NameNodeProtocol. I've filed 
HDFS-2986 to address this issue.
                
> HA: Balancer should use logical uri for creating failover proxy with HA 
> enabled.
> --------------------------------------------------------------------------------
>
>                 Key: HDFS-2979
>                 URL: https://issues.apache.org/jira/browse/HDFS-2979
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: balancer, hdfs client
>    Affects Versions: HA branch (HDFS-1623)
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>         Attachments: HDFS-2979.patch
>
>
> Presently Balancer uses real URI for creating the failover proxy.
> Since the failover proxy checks for uri consistency, we should pass logical 
> uri for creating failover proxy instead of instead of real URI. Presently 
> will work only with default port.
> java.io.IOException: Port 49832 specified in URI hdfs://127.0.0.1:49832 but 
> host '127.0.0.1' is a logical (HA) namenode and does not use port information.
>       at 
> org.apache.hadoop.hdfs.HAUtil.getFailoverProxyProviderClass(HAUtil.java:224)
>       at org.apache.hadoop.hdfs.HAUtil.createFailoverProxy(HAUtil.java:247)
>       at 
> org.apache.hadoop.hdfs.server.balancer.NameNodeConnector.<init>(NameNodeConnector.java:80)
>       at 
> org.apache.hadoop.hdfs.server.balancer.Balancer.run(Balancer.java:1401) 

--
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