[
https://issues.apache.org/jira/browse/HBASE-12706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14339586#comment-14339586
]
Stephen Yuan Jiang commented on HBASE-12706:
--------------------------------------------
[~stack], It is backward compatible (I kept the old UT to test the existing
format, I added new UT for new format - see my change in TestZookeeper.java -
this is testing in the ZKUtil and ZKConfig classes).
You asked that "does this work if i have server1 on port X and server1 on port
Y". Yes, it should work. I only tested it from UT. From hbase shell, I only
test single host. I am modifying MiniZooKeeperCluster and HMasterCommandLine
and testing it. Once testing is done, I will upload a new patch (with more
testing inside).
> Support multiple port numbers in ZK quorum string
> -------------------------------------------------
>
> Key: HBASE-12706
> URL: https://issues.apache.org/jira/browse/HBASE-12706
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 1.0.0, 2.0.0
> Reporter: Stephen Yuan Jiang
> Assignee: Stephen Yuan Jiang
> Priority: Critical
> Fix For: 2.0.0, 1.1.0
>
> Attachments: HBASE-12706.v1-master.patch
>
>
> HBase does not allow the zk quorum string to contain port numbers in this
> format:
> {noformat}
> hostname1:port1,hostname2:port2,hostname3:port3
> {noformat}
> Instead it expects the string to be in this format:
> {noformat}
> hostname1,hostname2,hostname3:port3
> {noformat}
> And port 3 is used for all the client ports. We should flex the parsing so
> that both forms are accepted.
> A sample exception:
> {code}
> java.io.IOException: Cluster key passed
> host1:2181,host2:2181,host3:2181,host4:2181,host5:2181:2181:/hbase is
> invalid, the format should
> be:hbase.zookeeper.quorum:hbase.zookeeper.client.port:zookeeper.znode.parent
> at
> org.apache.hadoop.hbase.zookeeper.ZKUtil.transformClusterKey(ZKUtil.java:403)
> at
> org.apache.hadoop.hbase.zookeeper.ZKUtil.applyClusterKeyToConf(ZKUtil.java:386)
> at
> org.apache.hadoop.hbase.replication.ReplicationPeersZKImpl.getPeerConf(ReplicationPeersZKImpl.java:304)
> at
> org.apache.hadoop.hbase.replication.ReplicationPeersZKImpl.createPeer(ReplicationPeersZKImpl.java:435)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)