[ https://issues.apache.org/jira/browse/HDFS-10544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15352117#comment-15352117 ]
Konstantin Shvachko commented on HDFS-10544: -------------------------------------------- Looking at the test case you added to {{TestDFSUtil.testGetNNUris()}}. Here is the essential part of the configuration: {code} fs.defaultFS=hdfs://nn2.example.com:9820, dfs.namenode.rpc-address=hdfs://nn.example.com:9820, dfs.nameservices=ns1,ns2, dfs.namenode.servicerpc-address.ns2=ns2-nn.example.com:9820, dfs.ha.namenodes.ns1=nn1,nn2, dfs.namenode.rpc-address.ns1.nn1=ns1-nn1.example.com:9820, dfs.namenode.rpc-address.ns1.nn2=ns1-nn2.example.com:9820, dfs.client.failover.proxy.provider.ns1=org.apache.hadoop.hdfs.server.namenode.ha.IPFailoverProxyProvider, {code} And {{DFSUtil.getInternalNsRpcUris()}} returns {{uris = \[hdfs://ns2-nn.example.com:9820, hdfs://nn.example.com:9820\]}}. Not sure if this is what you expected. Also in the test we know exactly what those URIs returned by {{getInternalNsRpcUris()}} should be, so it would make sense to add asserts for the values in addition to checking the number of the URIs. > Balancer doesn't work with IPFailoverProxyProvider > -------------------------------------------------- > > Key: HDFS-10544 > URL: https://issues.apache.org/jira/browse/HDFS-10544 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Zhe Zhang > Assignee: Zhe Zhang > Attachments: HDFS-10544.00.patch, HDFS-10544.01.patch, > HDFS-10544.02.patch, HDFS-10544.03.patch > > > Right now {{Balancer}} gets the NN URIs through > {{DFSUtil#getNameServiceUris}}, which returns logical URIs in HA is enabled. > If {{IPFailoverProxyProvider}} is used, {{Balancer}} will not be able to > start. > I think the bug is at {{DFSUtil#getNameServiceUris}}: > {code} > for (String nsId : getNameServiceIds(conf)) { > if (HAUtil.isHAEnabled(conf, nsId)) { > // Add the logical URI of the nameservice. > try { > ret.add(new URI(HdfsConstants.HDFS_URI_SCHEME + "://" + nsId)); > {code} > Then {{if}} clause should also consider if the {{FailoverProxyProvider}} has > {{useLogicalURI}} enabled. If not, {{getNameServiceUris}} should try to > resolve the physical URI for this nsId. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org