[ https://issues.apache.org/jira/browse/HBASE-12706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Enis Soztutar updated HBASE-12706: ---------------------------------- Attachment: hbase-12706-alternate.patch [~syuanjiang] I was thinking about the multi port approach in clusterKey again, and I think we can simplify a little bit more (I was mentioning this in one of the RB comments as well). Right now, with v2 patch we support cluster keys in format: {{quorum:clientPort:znode}} format. Quorum can contain client ports or not, and if not, we use the clientPort by default. However, this format makes the cluster key confusing if the quorum already contains the ports, which makes clientPort totally useless. I was thinking supporting only two formats: Old way: {{s1,s2,s3:clientPort:znode}} OR {{s1:clientPort:znode}} New way : {{s1:p1,s2:p2,s3:p3:/hbase}}. Notice that the difference is we do not actually have an extra port. I think in the patch, you support parsing both of these formats, but we sometimes generate the clusterKey from the configuration (for example for setting up replication). In those cases, we will use generate the cluster key in format {{s1:p1,s2:p2,s3:p3:p3:/hbase}}. I've attached a patch (which only have little changes to your patch) which should do what I was talking about. What do you think? > 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-branch-1.patch, > HBASE-12706.v2-master.patch, hbase-12706-alternate.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)