hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1554001 - /hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
Date Sun, 29 Dec 2013 08:13:35 GMT
Author: apurtell
Date: Sun Dec 29 08:13:35 2013
New Revision: 1554001

URL: http://svn.apache.org/r1554001
Log:
HBASE-10176. Canary#sniff() should close the HTable instance (Ted Yu)

Modified:
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java?rev=1554001&r1=1554000&r2=1554001&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
Sun Dec 29 08:13:35 2013
@@ -472,13 +472,17 @@ public final class Canary implements Too
       return;
     }
 
-    for (HRegionInfo region : admin.getTableRegions(tableDesc.getName())) {
-      try {
-        sniffRegion(admin, sink, region, table);
-      } catch (Exception e) {
-        sink.publishReadFailure(region, e);
-        LOG.debug("sniffRegion failed", e);
+    try {
+      for (HRegionInfo region : admin.getTableRegions(tableDesc.getName())) {
+        try {
+          sniffRegion(admin, sink, region, table);
+        } catch (Exception e) {
+          sink.publishReadFailure(region, e);
+          LOG.debug("sniffRegion failed", e);
+        }
       }
+    } finally {
+      table.close();
     }
   }
 



Mime
View raw message