HBASE-25016 addendum: should also close the Table which is returned by calling getMetaHTable
Closes #2393 Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
0f00e1c7c7
commit
dcba4930d4
|
@ -249,7 +249,8 @@ public final class MetaTableAccessor {
|
|||
new RowFilter(CompareOperator.EQUAL, new SubstringComparator(regionEncodedName));
|
||||
Scan scan = getMetaScan(connection, 1);
|
||||
scan.setFilter(rowFilter);
|
||||
try (ResultScanner resultScanner = getMetaHTable(connection).getScanner(scan)) {
|
||||
try (Table table = getMetaHTable(connection);
|
||||
ResultScanner resultScanner = table.getScanner(scan)) {
|
||||
return resultScanner.next();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue