FAQ
Author: hashutosh
Date: Tue Nov 27 17:34:24 2012
New Revision: 1414279

URL: http://svn.apache.org/viewvc?rev=1414279&view=rev
Log:
HIVE-3723 : Hive Driver leaks ZooKeeper connections (Gunther Hagleitner via Ashutosh Chauhan)

Modified:
hive/branches/branch-0.10/ql/src/java/org/apache/hadoop/hive/ql/Driver.java

Modified: hive/branches/branch-0.10/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.10/ql/src/java/org/apache/hadoop/hive/ql/Driver.java?rev=1414279&r1=1414278&r2=1414279&view=diff
==============================================================================
--- hive/branches/branch-0.10/ql/src/java/org/apache/hadoop/hive/ql/Driver.java (original)
+++ hive/branches/branch-0.10/ql/src/java/org/apache/hadoop/hive/ql/Driver.java Tue Nov 27 17:34:24 2012
@@ -845,20 +845,6 @@ public class Driver implements CommandPr
}

/**
- * Release all the locks acquired implicitly by the statement. Note that the locks acquired with
- * 'keepAlive' set to True are not released.
- **/
- private void releaseLocks() {
- if (ctx != null && ctx.getHiveLockMgr() != null) {
- try {
- ctx.getHiveLockMgr().close();
- ctx.setHiveLocks(null);
- } catch (LockException e) {
- }
- }
- }
-
- /**
* @param hiveLocks
* list of hive locks to be released Release all the locks specified. If some of the
* locks have already been released, ignore them
@@ -1488,7 +1474,18 @@ public class Driver implements CommandPr
}

public void destroy() {
- releaseLocks();
+ if (ctx != null) {
+ releaseLocks(ctx.getHiveLocks());
+ }
+
+ if (hiveLockMgr != null) {
+ try {
+ hiveLockMgr.close();
+ } catch(LockException e) {
+ LOG.warn("Exception in closing hive lock manager. "
+ + org.apache.hadoop.util.StringUtils.stringifyException(e));
+ }
+ }
}

public org.apache.hadoop.hive.ql.plan.api.Query getQueryPlan() throws IOException {

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedNov 27, '12 at 5:34p
activeNov 27, '12 at 5:34p
posts1
users1
websitehive.apache.org

1 user in discussion

Hashutosh: 1 post

People

Translate

site design / logo © 2021 Grokbase