[
https://issues.apache.org/jira/browse/HIVE-6755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrey Stepachev reopened HIVE-6755:
------------------------------------
I propose to release HiveLockManager right at the end of driver execution.
I checked code, but not sure that such change is possible yet.
> Zookeeper Lock Manager leaks zookeeper connections.
> ---------------------------------------------------
>
> Key: HIVE-6755
> URL: https://issues.apache.org/jira/browse/HIVE-6755
> Project: Hive
> Issue Type: Bug
> Components: HiveServer2
> Affects Versions: 0.12.0
> Environment: cloudera cdh5b2
> Reporter: Andrey Stepachev
> Priority: Critical
>
> Code below in case of any errors in zooKeeper.create statement leaves
> unclosed zookeeper instance.
> Thats lead to connection exhausting on zookeeper over time.
> {code:title=ZooKeeperHiveLockManager.java|borderStyle=solid}
> try {
> renewZookeeperInstance(sessionTimeout, quorumServers);
> parent = conf.getVar(HiveConf.ConfVars.HIVE_ZOOKEEPER_NAMESPACE);
> try {
> zooKeeper.create("/" + parent, new byte[0], Ids.OPEN_ACL_UNSAFE,
> CreateMode.PERSISTENT);
> } catch (KeeperException e) {
> // ignore if the parent already exists
> if (e.code() != KeeperException.Code.NODEEXISTS) {
> LOG.warn("Unexpected ZK exception when creating parent node /" +
> parent, e);
> }
> }
> } catch (Exception e) {
> LOG.error("Failed to create ZooKeeper object: ", e);
> throw new
> LockException(ErrorMsg.ZOOKEEPER_CLIENT_COULD_NOT_BE_INITIALIZED.getMsg());
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)