HBASE-16359 Addendum fixes TestZKBasedOpenCloseRegion

This commit is contained in:
tedyu 2016-08-05 10:54:20 -07:00
parent 00f6af2e85
commit b1c60940da
1 changed files with 5 additions and 5 deletions

View File

@ -1599,6 +1599,11 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
}
}
LOG.info("Open " + region.getRegionNameAsString());
htd = htds.get(region.getTable());
if (htd == null) {
htd = regionServer.tableDescriptors.get(region.getTable());
htds.put(region.getTable(), htd);
}
final Boolean previous = regionServer.regionsInTransitionInRS.putIfAbsent(
region.getEncodedNameAsBytes(), Boolean.TRUE);
@ -1641,11 +1646,6 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
tmpRegions);
}
}
htd = htds.get(region.getTable());
if (htd == null) {
htd = regionServer.tableDescriptors.get(region.getTable());
htds.put(region.getTable(), htd);
}
if (htd == null) {
throw new IOException("Missing table descriptor for " + region.getEncodedName());
}