@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 | Field and Description |
---|---|
private static String |
hbaseServicePackage
We assume that all HBase protobuf services share a common package name (defined in the .proto
files).
|
private static org.slf4j.Logger |
LOG |
Modifier | Constructor and Description |
---|---|
private |
CoprocessorRpcUtils() |
Modifier and Type | Method and Description |
---|---|
static IOException |
getControllerException(com.google.protobuf.RpcController controller)
Retreivies exception stored during RPC invocation.
|
private static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceCall |
getCoprocessorServiceCall(com.google.protobuf.Descriptors.MethodDescriptor method,
com.google.protobuf.Message request,
byte[] row) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest |
getCoprocessorServiceRequest(com.google.protobuf.Descriptors.MethodDescriptor method,
com.google.protobuf.Message request) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.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(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponse result,
com.google.protobuf.Message responsePrototype) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.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.
|
private static final org.slf4j.Logger LOG
private static final String hbaseServicePackage
private CoprocessorRpcUtils()
public static String getServiceName(com.google.protobuf.Descriptors.ServiceDescriptor service)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest getCoprocessorServiceRequest(com.google.protobuf.Descriptors.MethodDescriptor method, com.google.protobuf.Message request)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest getCoprocessorServiceRequest(com.google.protobuf.Descriptors.MethodDescriptor method, com.google.protobuf.Message request, byte[] row, byte[] regionName)
private static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceCall getCoprocessorServiceCall(com.google.protobuf.Descriptors.MethodDescriptor method, com.google.protobuf.Message request, byte[] row)
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(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponse result, com.google.protobuf.Message responsePrototype) throws IOException
IOException
public static org.apache.hadoop.hbase.shaded.protobuf.generated.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–2020 The Apache Software Foundation. All rights reserved.