Package org.apache.hadoop.hbase.client
Class ServerConnectionUtils.ShortCircuitingClusterConnection.ClientServiceBlockingInterfaceWrapper
java.lang.Object
org.apache.hadoop.hbase.client.ServerConnectionUtils.ShortCircuitingClusterConnection.ClientServiceBlockingInterfaceWrapper
- All Implemented Interfaces:
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface
- Enclosing class:
- ServerConnectionUtils.ShortCircuitingClusterConnection
static class ServerConnectionUtils.ShortCircuitingClusterConnection.ClientServiceBlockingInterfaceWrapper
extends Object
implements org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface
When we directly invoke
RSRpcServices.get(org.apache.hbase.thirdparty.com.google.protobuf.RpcController, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetRequest) on the same RegionServer through
ServerConnectionUtils.ShortCircuitingClusterConnection in region CPs such as
RegionObserver.postScannerOpen(org.apache.hadoop.hbase.coprocessor.ObserverContext<org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment>, org.apache.hadoop.hbase.client.Scan, org.apache.hadoop.hbase.regionserver.RegionScanner) to get other rows, the RegionScanner created
for the directly RSRpcServices.get(org.apache.hbase.thirdparty.com.google.protobuf.RpcController, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetRequest) may not be closed until the outmost rpc call is
completed if there is an outmost RpcCall, and even worse , the
ServerCall.rpcCallback may be override which would cause serious problem,so for
ServerConnectionUtils.ShortCircuitingClusterConnection.getClient(org.apache.hadoop.hbase.ServerName), if return
ServerConnectionUtils.ShortCircuitingClusterConnection.localHostClient,we would add a wrapper class to wrap
it , which using RpcServer.unsetCurrentCall() and {RpcServer#setCurrentCall} to
surround the scan and get method call,so the RegionScanner created for the directly
RSRpcServices.get(org.apache.hbase.thirdparty.com.google.protobuf.RpcController, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetRequest) could be closed immediately,see HBASE-26812 for more.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interfaceServerConnectionUtils.ShortCircuitingClusterConnection.ClientServiceBlockingInterfaceWrapper.Operation<REQUEST,RESPONSE> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface -
Constructor Summary
ConstructorsConstructorDescriptionClientServiceBlockingInterfaceWrapper(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface target) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.BulkLoadHFileResponsebulkLoadHFile(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.BulkLoadHFileRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CleanupBulkLoadResponsecleanupBulkLoad(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CleanupBulkLoadRequest request) private <REQUEST,RESPONSE>
RESPONSEdoCall(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, REQUEST request, ServerConnectionUtils.ShortCircuitingClusterConnection.ClientServiceBlockingInterfaceWrapper.Operation<REQUEST, RESPONSE> operation) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponseexecRegionServerService(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponseexecService(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetResponseget(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiResponsemulti(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateResponsemutate(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.PrepareBulkLoadResponseprepareBulkLoad(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.PrepareBulkLoadRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponsescan(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest request)
-
Field Details
-
target
private org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface target
-
-
Constructor Details
-
ClientServiceBlockingInterfaceWrapper
ClientServiceBlockingInterfaceWrapper(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface target)
-
-
Method Details
-
get
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetResponse get(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.GetRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
getin interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
multi
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiResponse multi(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
multiin interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
scan
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse scan(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
scanin interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
doCall
private <REQUEST,RESPONSE> RESPONSE doCall(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, REQUEST request, ServerConnectionUtils.ShortCircuitingClusterConnection.ClientServiceBlockingInterfaceWrapper.Operation<REQUEST, RESPONSE> operation) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
mutate
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateResponse mutate(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MutateRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
mutatein interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
bulkLoadHFile
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.BulkLoadHFileResponse bulkLoadHFile(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.BulkLoadHFileRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
bulkLoadHFilein interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
prepareBulkLoad
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.PrepareBulkLoadResponse prepareBulkLoad(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.PrepareBulkLoadRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
prepareBulkLoadin interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
cleanupBulkLoad
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CleanupBulkLoadResponse cleanupBulkLoad(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CleanupBulkLoadRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
cleanupBulkLoadin interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
execService
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponse execService(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
execServicein interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
execRegionServerService
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponse execRegionServerService(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
execRegionServerServicein interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-