HBASE-10176 Canary#sniff() should close the HTable instance

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1553857 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2013-12-28 15:58:59 +00:00
parent ea7734dc90
commit 97ec854f57
1 changed files with 10 additions and 6 deletions

View File

@ -472,6 +472,7 @@ public final class Canary implements Tool {
return;
}
try {
for (HRegionInfo region : admin.getTableRegions(tableDesc.getName())) {
try {
sniffRegion(admin, sink, region, table);
@ -480,6 +481,9 @@ public final class Canary implements Tool {
LOG.debug("sniffRegion failed", e);
}
}
} finally {
table.close();
}
}
/*