Package org.apache.hadoop.hbase.client
Class NoncedRegionServerCallable<T>
java.lang.Object
org.apache.hadoop.hbase.client.RegionServerCallable<T,org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface>
org.apache.hadoop.hbase.client.ClientServiceCallable<T>
org.apache.hadoop.hbase.client.NoncedRegionServerCallable<T>
- Type Parameters:
T
- the class that the ServerCallable handles
- All Implemented Interfaces:
RetryingCallable<T>
Implementations make an rpc call against a RegionService via a protobuf Service. Implement
#rpcCall(RpcController) and then call
RegionServerCallable.call(int)
to trigger the rpc. The
RegionServerCallable.call(int)
eventually invokes your #rpcCall(RpcController) meanwhile saving you having to
write a bunch of boilerplate. The RegionServerCallable.call(int)
implementation is from
RpcRetryingCaller
so rpcs are retried on fail.
TODO: this class is actually tied to one region, because most of the paths make use of the regioninfo part of location when building requests. The only reason it works for multi-region requests (e.g. batch) is that they happen to not use the region parts. This could be done cleaner (e.g. having a generic parameter and 2 derived classes, RegionCallable and actual RegionServerCallable with ServerName.
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.client.RegionServerCallable
location, requestAttributes, rpcController, stub
-
Constructor Summary
ConstructorDescriptionNoncedRegionServerCallable
(Connection connection, TableName tableName, byte[] row, HBaseRpcController rpcController, int priority, Map<String, byte[]> requestAttributes) -
Method Summary
Methods inherited from class org.apache.hadoop.hbase.client.ClientServiceCallable
doGet, doMutate, setStubByServiceName
Methods inherited from class org.apache.hadoop.hbase.client.RegionServerCallable
call, getConnection, getExceptionMessageAdditionalDetail, getHRegionInfo, getLocation, getPriority, getRow, getRpcController, getRpcControllerCellScanner, getStub, getTableName, prepare, rpcCall, setLocation, setRpcControllerCellScanner, setStub, sleep, throwable
-
Field Details
-
nonce
-
-
Constructor Details
-
NoncedRegionServerCallable
public NoncedRegionServerCallable(Connection connection, TableName tableName, byte[] row, HBaseRpcController rpcController, int priority, Map<String, byte[]> requestAttributes) - Parameters:
connection
- Connection to use.tableName
- Table name to whichrow
belongs.row
- The row we want intableName
.
-
-
Method Details
-
getNonceGroup
long getNonceGroup() -
getNonce
long getNonce()
-