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:
parent
ea7734dc90
commit
97ec854f57
|
@ -472,13 +472,17 @@ public final class Canary implements Tool {
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue