diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 951ef6d..5f7f177 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -2806,6 +2806,7 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa final GetRequest request) throws ServiceException { long before = EnvironmentEdgeManager.currentTimeMillis(); try { + checkOpen(); requestCount.increment(); HRegion region = getRegion(request.getRegion()); @@ -2872,6 +2873,7 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa // Clear scanner so we are not holding on to reference across call. if (controller != null) controller.setCellScanner(null); try { + checkOpen(); requestCount.increment(); HRegion region = getRegion(request.getRegion()); MutateResponse.Builder builder = MutateResponse.newBuilder(); @@ -3242,6 +3244,7 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa public BulkLoadHFileResponse bulkLoadHFile(final RpcController controller, final BulkLoadHFileRequest request) throws ServiceException { try { + checkOpen(); requestCount.increment(); HRegion region = getRegion(request.getRegion()); List> familyPaths = new ArrayList>(); @@ -3272,6 +3275,7 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa public CoprocessorServiceResponse execService(final RpcController controller, final CoprocessorServiceRequest request) throws ServiceException { try { + checkOpen(); requestCount.increment(); HRegion region = getRegion(request.getRegion()); // ignore the passed in controller (from the serialized call) @@ -3303,7 +3307,12 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa @Override public MultiResponse multi(final RpcController rpcc, final MultiRequest request) throws ServiceException { - + try { + checkOpen(); + } catch (IOException ie) { + throw new ServiceException(ie); + } + // rpc controller is how we bring in data via the back door; it is unprotobuf'ed data. // It is also the conduit via which we pass back data. PayloadCarryingRpcController controller = (PayloadCarryingRpcController)rpcc; @@ -3469,6 +3478,7 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa public GetStoreFileResponse getStoreFile(final RpcController controller, final GetStoreFileRequest request) throws ServiceException { try { + checkOpen(); HRegion region = getRegion(request.getRegion()); requestCount.increment(); Set columnFamilies; @@ -3982,6 +3992,7 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa public RollWALWriterResponse rollWALWriter(final RpcController controller, final RollWALWriterRequest request) throws ServiceException { try { + checkOpen(); requestCount.increment(); HLog wal = this.getWAL(); byte[][] regionsToFlush = wal.rollWriter(true); @@ -4023,6 +4034,11 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa @Override public GetServerInfoResponse getServerInfo(final RpcController controller, final GetServerInfoRequest request) throws ServiceException { + try { + checkOpen(); + } catch (IOException ie) { + throw new ServiceException(ie); + } ServerName serverName = getServerName(); requestCount.increment(); return ResponseConverter.buildGetServerInfoResponse(serverName, rsInfo.getInfoPort());