HBASE-25016 Should close ResultScanner in MetaTableAccessor.scanByRegionEncodedName
Closes #2390 Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
fe776306d0
commit
a393fc594c
@ -249,9 +249,10 @@ public final class MetaTableAccessor {
|
||||
new RowFilter(CompareOperator.EQUAL, new SubstringComparator(regionEncodedName));
|
||||
Scan scan = getMetaScan(connection, 1);
|
||||
scan.setFilter(rowFilter);
|
||||
ResultScanner resultScanner = getMetaHTable(connection).getScanner(scan);
|
||||
try (ResultScanner resultScanner = getMetaHTable(connection).getScanner(scan)) {
|
||||
return resultScanner.next();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all of the regions currently in META.
|
||||
|
Loading…
x
Reference in New Issue
Block a user