@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(RpcController controller)
Retreivies exception stored during RPC invocation.
|
static ClientProtos.CoprocessorServiceRequest |
getCoprocessorServiceRequest(Descriptors.MethodDescriptor method,
Message request) |
static ClientProtos.CoprocessorServiceRequest |
getCoprocessorServiceRequest(Descriptors.MethodDescriptor method,
Message request,
byte[] row,
byte[] regionName) |
static Descriptors.MethodDescriptor |
getMethodDescriptor(String methodName,
Descriptors.ServiceDescriptor serviceDesc) |
static Message |
getRequest(Service service,
Descriptors.MethodDescriptor methodDesc,
org.apache.hbase.thirdparty.com.google.protobuf.ByteString shadedRequest) |
static Message |
getResponse(ClientProtos.CoprocessorServiceResponse result,
Message responsePrototype) |
static ClientProtos.CoprocessorServiceResponse |
getResponse(Message result,
byte[] regionName) |
static String |
getServiceName(Descriptors.ServiceDescriptor service)
Returns the name to use for coprocessor service calls.
|
static void |
setControllerException(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(Descriptors.ServiceDescriptor service)
public static ClientProtos.CoprocessorServiceRequest getCoprocessorServiceRequest(Descriptors.MethodDescriptor method, Message request)
public static ClientProtos.CoprocessorServiceRequest getCoprocessorServiceRequest(Descriptors.MethodDescriptor method, Message request, byte[] row, byte[] regionName)
public static Descriptors.MethodDescriptor getMethodDescriptor(String methodName, Descriptors.ServiceDescriptor serviceDesc) throws UnknownProtocolException
UnknownProtocolExceptionpublic static Message getRequest(Service service, Descriptors.MethodDescriptor methodDesc, org.apache.hbase.thirdparty.com.google.protobuf.ByteString shadedRequest) throws IOException
IOExceptionpublic static Message getResponse(ClientProtos.CoprocessorServiceResponse result, Message responsePrototype) throws IOException
IOExceptionpublic static ClientProtos.CoprocessorServiceResponse getResponse(Message result, byte[] regionName)
public static void setControllerException(RpcController controller, IOException ioe)
controller - the controller instance provided by the client when calling the serviceioe - the exception encountered@Nullable public static IOException getControllerException(RpcController controller) throws IOException
controller - the controller instance provided by the client when calling the serviceIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.