hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-13797 Fix resource leak in HBaseFsck
Date Fri, 29 May 2015 02:17:09 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 0c9023137 -> 4545420d6


HBASE-13797 Fix resource leak in HBaseFsck


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

Branch: refs/heads/branch-1
Commit: 4545420d611735b8f3e85434d95aafa8feaf86e7
Parents: 0c90231
Author: tedyu <yuzhihong@gmail.com>
Authored: Thu May 28 19:17:04 2015 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Thu May 28 19:17:04 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4545420d/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
index 36dd2d6..149c8de 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
@@ -3345,7 +3345,11 @@ public class HBaseFsck extends Configured implements Closeable {
   KeeperException {
     undeployRegions(hi);
     ZooKeeperWatcher zkw = createZooKeeperWatcher();
-    ZKUtil.deleteNode(zkw, zkw.getZNodeForReplica(hi.metaEntry.getReplicaId()));
+    try {
+      ZKUtil.deleteNode(zkw, zkw.getZNodeForReplica(hi.metaEntry.getReplicaId()));
+    } finally {
+      zkw.close();
+    }
   }
 
   private void assignMetaReplica(int replicaId)


Mime
View raw message