@InterfaceAudience.Private public final class CoprocessorRpcUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CoprocessorRpcUtils.BlockingRpcCallback<R>
Simple
RpcCallback implementation providing a
Future -like BlockingRpcCallback.get() method, which
will block util the instance's BlockingRpcCallback.run(Object) method has been called. |
Modifier and Type | Method and Description |
---|---|
static IOException |
getControllerException(com.google.protobuf.RpcController controller)
Retreivies exception stored during RPC invocation.
|
static ClientProtos.CoprocessorServiceRequest |
getCoprocessorServiceRequest(com.google.protobuf.Descriptors.MethodDescriptor method,
com.google.protobuf.Message request) |
static ClientProtos.CoprocessorServiceRequest |
getCoprocessorServiceRequest(com.google.protobuf.Descriptors.MethodDescriptor method,
com.google.protobuf.Message request,
byte[] row,
byte[] regionName) |
static com.google.protobuf.Descriptors.MethodDescriptor |
getMethodDescriptor(String methodName,
com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc) |
static com.google.protobuf.Message |
getRequest(com.google.protobuf.Service service,
com.google.protobuf.Descriptors.MethodDescriptor methodDesc,
org.apache.hbase.thirdparty.com.google.protobuf.ByteString shadedRequest) |
static com.google.protobuf.Message |
getResponse(ClientProtos.CoprocessorServiceResponse result,
com.google.protobuf.Message responsePrototype) |
static ClientProtos.CoprocessorServiceResponse |
getResponse(com.google.protobuf.Message result,
byte[] regionName) |
static String |
getServiceName(com.google.protobuf.Descriptors.ServiceDescriptor service)
Returns the name to use for coprocessor service calls.
|
static void |
setControllerException(com.google.protobuf.RpcController controller,
IOException ioe)
Stores an exception encountered during RPC invocation so it can be passed back
through to the client.
|
public static String getServiceName(com.google.protobuf.Descriptors.ServiceDescriptor service)
public static ClientProtos.CoprocessorServiceRequest getCoprocessorServiceRequest(com.google.protobuf.Descriptors.MethodDescriptor method, com.google.protobuf.Message request)
public static ClientProtos.CoprocessorServiceRequest getCoprocessorServiceRequest(com.google.protobuf.Descriptors.MethodDescriptor method, com.google.protobuf.Message request, byte[] row, byte[] regionName)
public static com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor(String methodName, com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc) throws UnknownProtocolException
UnknownProtocolException
public static com.google.protobuf.Message getRequest(com.google.protobuf.Service service, com.google.protobuf.Descriptors.MethodDescriptor methodDesc, org.apache.hbase.thirdparty.com.google.protobuf.ByteString shadedRequest) throws IOException
IOException
public static com.google.protobuf.Message getResponse(ClientProtos.CoprocessorServiceResponse result, com.google.protobuf.Message responsePrototype) throws IOException
IOException
public static ClientProtos.CoprocessorServiceResponse getResponse(com.google.protobuf.Message result, byte[] regionName)
public static void setControllerException(com.google.protobuf.RpcController controller, IOException ioe)
controller
- the controller instance provided by the client when calling the serviceioe
- the exception encountered@Nullable public static IOException getControllerException(com.google.protobuf.RpcController controller) throws IOException
controller
- the controller instance provided by the client when calling the serviceIOException
Copyright © 2007–2019 Cloudera. All rights reserved.