HBASE-10461 table.close() in TableEventHandler#reOpenAllRegions() should be enclosed in finally block
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1564184 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9155266fba
commit
5a965b599e
|
@ -172,8 +172,13 @@ public abstract class TableEventHandler extends EventHandler {
|
|||
HTable table = new HTable(masterServices.getConfiguration(), tableName);
|
||||
TreeMap<ServerName, List<HRegionInfo>> serverToRegions = Maps
|
||||
.newTreeMap();
|
||||
NavigableMap<HRegionInfo, ServerName> hriHserverMapping = table.getRegionLocations();
|
||||
NavigableMap<HRegionInfo, ServerName> hriHserverMapping;
|
||||
try {
|
||||
hriHserverMapping = table.getRegionLocations();
|
||||
} finally {
|
||||
table.close();
|
||||
}
|
||||
|
||||
List<HRegionInfo> reRegions = new ArrayList<HRegionInfo>();
|
||||
for (HRegionInfo hri : regions) {
|
||||
ServerName rsLocation = hriHserverMapping.get(hri);
|
||||
|
|
Loading…
Reference in New Issue