hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venki Korukanti" <>
Subject Review Request 14978: HIVE-5643: ZooKeeperHiveLockManager.getQuorumServers incorrectly appends the custom zk port to quorum hosts
Date Sun, 27 Oct 2013 06:52:36 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for hive and Brock Noland.

Bugs: HIVE-5643

Repository: hive-git


ZooKeeperHiveLockManager calls the below method to construct the connection string for ZooKeeper

  private static String getQuorumServers(HiveConf conf) {
    String hosts = conf.getVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_QUORUM);
    String port = conf.getVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_CLIENT_PORT);
    return hosts + ":" + port;

For example:
HIVE_ZOOKEEPER_QUORUM=node1, node2, node3

Connection string given to ZooKeeper client object is "node1, node2, node3:9999". ZooKeeper
consider the default port as 2181 for hostnames that don't have any port. This works fine
as long as HIVE_ZOOKEEPER_CLIENT_PORT is 2181. If it is different then ZooKeeper client object
tries to connect to node1 and node2 on port 2181 which always fails. So it has only one choice
the last host which receives all the load from Hive.


  ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ 735e745

  ql/src/test/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ 2ff48f5



Added a unittest for getQuorumServers which test different types of quorum settings.


Venki Korukanti

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message