HBASE-25016 Should close ResultScanner in MetaTableAccessor.scanByRegionEncodedName
Closes #2390 Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
4087743745
commit
67233dcb42
|
@ -365,8 +365,9 @@ public class MetaTableAccessor {
|
|||
new SubstringComparator(regionEncodedName));
|
||||
Scan scan = getMetaScan(connection, 1);
|
||||
scan.setFilter(rowFilter);
|
||||
ResultScanner resultScanner = getMetaHTable(connection).getScanner(scan);
|
||||
return resultScanner.next();
|
||||
try (ResultScanner resultScanner = getMetaHTable(connection).getScanner(scan)) {
|
||||
return resultScanner.next();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue