You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Venki Korukanti (JIRA)" <ji...@apache.org> on 2013/10/24 23:22:01 UTC

[jira] [Updated] (HIVE-5643) ZooKeeperHiveLockManager.getQuorumServers incorrectly appends the custom zk port to quorum hosts

     [ https://issues.apache.org/jira/browse/HIVE-5643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Venki Korukanti updated HIVE-5643:
----------------------------------

    Description: 
ZooKeeperHiveLockManager calls the below method to construct the connection string for ZooKeeper connection.

{code}
  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;
  }
{code}

For example:
HIVE_ZOOKEEPER_QUORUM=node1, node2, node3
HIVE_ZOOKEEPER_CLIENT_PORT=9999

Connection string given to ZooKeeper 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.

  was:
ZooKeeperHiveLockManager calls the below method to construct the connection string for ZooKeeper connection.

<code>
  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;
  }
</code>

For example:
HIVE_ZOOKEEPER_QUORUM=node1, node2, node3
HIVE_ZOOKEEPER_CLIENT_PORT=9999

Connection string given to ZooKeeper 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.


> ZooKeeperHiveLockManager.getQuorumServers incorrectly appends the custom zk port to quorum hosts
> ------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-5643
>                 URL: https://issues.apache.org/jira/browse/HIVE-5643
>             Project: Hive
>          Issue Type: Bug
>          Components: Locking
>    Affects Versions: 0.12.0
>            Reporter: Venki Korukanti
>            Assignee: Venki Korukanti
>             Fix For: 0.13.0
>
>
> ZooKeeperHiveLockManager calls the below method to construct the connection string for ZooKeeper connection.
> {code}
>   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;
>   }
> {code}
> For example:
> HIVE_ZOOKEEPER_QUORUM=node1, node2, node3
> HIVE_ZOOKEEPER_CLIENT_PORT=9999
> Connection string given to ZooKeeper 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.



--
This message was sent by Atlassian JIRA
(v6.1#6144)