hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aihu...@apache.org
Subject hive git commit: HIVE-12418: HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak. (Naveen Gangam via Aihua Xu)
Date Thu, 19 Nov 2015 14:10:27 GMT
Repository: hive
Updated Branches:
  refs/heads/master efd488487 -> e3203c591


HIVE-12418: HiveHBaseTableInputFormat.getRecordReader() causes Zookeeper connection leak.
(Naveen Gangam via Aihua Xu)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e3203c59
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e3203c59
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e3203c59

Branch: refs/heads/master
Commit: e3203c591ee4415553bfe3e5c76628c52a713297
Parents: efd4884
Author: aihuaxu <aihuaxu@apache.org>
Authored: Thu Nov 19 09:07:50 2015 -0500
Committer: aihuaxu <aihuaxu@apache.org>
Committed: Thu Nov 19 09:07:50 2015 -0500

----------------------------------------------------------------------
 .../hadoop/hive/hbase/HiveHBaseTableInputFormat.java      | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e3203c59/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat.java
----------------------------------------------------------------------
diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat.java
b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat.java
index fff9871..b17714f 100644
--- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat.java
+++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat.java
@@ -116,6 +116,7 @@ public class HiveHBaseTableInputFormat extends TableInputFormatBase
       @Override
       public void close() throws IOException {
         recordReader.close();
+        closeTable();
       }
 
       @Override
@@ -511,4 +512,13 @@ public class HiveHBaseTableInputFormat extends TableInputFormatBase
       closeTable();
     }
   }
+
+  @Override
+  protected void finalize() throws Throwable {
+    try {
+      closeTable();
+    } finally {
+      super.finalize();
+    }
+  }
 }


Mime
View raw message