HBASE-15746 Remove extra RegionCoprocessor preClose() in RSRpcServices#closeRegion (Stephen Yuan Jiang)
This commit is contained in:
parent
17bcf14fea
commit
df24004353
|
@ -2845,6 +2845,7 @@ public class HRegionServer extends HasThread implements
|
|||
throws NotServingRegionException {
|
||||
//Check for permissions to close.
|
||||
Region actualRegion = this.getFromOnlineRegions(encodedName);
|
||||
// Can be null if we're calling close on a region that's not online
|
||||
if ((actualRegion != null) && (actualRegion.getCoprocessorHost() != null)) {
|
||||
try {
|
||||
actualRegion.getCoprocessorHost().preClose(false);
|
||||
|
|
|
@ -1324,12 +1324,6 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
|||
}
|
||||
final String encodedRegionName = ProtobufUtil.getRegionEncodedName(request.getRegion());
|
||||
|
||||
// Can be null if we're calling close on a region that's not online
|
||||
final Region region = regionServer.getFromOnlineRegions(encodedRegionName);
|
||||
if ((region != null) && (region .getCoprocessorHost() != null)) {
|
||||
region.getCoprocessorHost().preClose(false);
|
||||
}
|
||||
|
||||
requestCount.increment();
|
||||
LOG.info("Close " + encodedRegionName + ", moving to " + sn);
|
||||
boolean closed = regionServer.closeRegion(encodedRegionName, false, sn);
|
||||
|
|
Loading…
Reference in New Issue