@InterfaceAudience.Private public abstract class RegionAdminServiceCallable<T> extends Object implements RetryingCallable<T>
| Modifier and Type | Field and Description | 
|---|---|
| protected ClusterConnection | connection | 
| protected HRegionLocation | location | 
| protected int | replicaId | 
| protected byte[] | row | 
| protected RpcControllerFactory | rpcControllerFactory | 
| protected org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface | stub | 
| protected TableName | tableName | 
| Constructor and Description | 
|---|
| RegionAdminServiceCallable(ClusterConnection connection,
                          RpcControllerFactory rpcControllerFactory,
                          HRegionLocation location,
                          TableName tableName,
                          byte[] row) | 
| RegionAdminServiceCallable(ClusterConnection connection,
                          RpcControllerFactory rpcControllerFactory,
                          HRegionLocation location,
                          TableName tableName,
                          byte[] row,
                          int replicaId) | 
| RegionAdminServiceCallable(ClusterConnection connection,
                          RpcControllerFactory rpcControllerFactory,
                          TableName tableName,
                          byte[] row) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract T | call(HBaseRpcController rpcController)Run RPC call. | 
| T | call(int callTimeout)Override that changes Exception from  ExceptiontoIOException. | 
| protected String | getExceptionMessage() | 
| String | getExceptionMessageAdditionalDetail()Returns Some details from the implementation that we would like to add to a terminating
 exception; i.e. | 
| HRegionLocation | getLocation(boolean useCache) | 
| static RegionLocations | getRegionLocations(ClusterConnection connection,
                  TableName tableName,
                  byte[] row,
                  boolean useCache,
                  int replicaId) | 
| void | prepare(boolean reload)Prepare by setting up any connections to servers, etc., ahead of call invocation. | 
| protected void | setStub(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface stub) | 
| long | sleep(long pause,
     int tries)Sleep and retry. | 
| void | throwable(Throwable t,
         boolean retrying)Called when call throws an exception and we are going to retry; take action to make it so we
 succeed on next call (clear caches, do relookup of locations, etc.). | 
protected org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface stub
protected final RpcControllerFactory rpcControllerFactory
protected final ClusterConnection connection
protected HRegionLocation location
protected final TableName tableName
protected final byte[] row
protected final int replicaId
public RegionAdminServiceCallable(ClusterConnection connection, RpcControllerFactory rpcControllerFactory, TableName tableName, byte[] row)
public RegionAdminServiceCallable(ClusterConnection connection, RpcControllerFactory rpcControllerFactory, HRegionLocation location, TableName tableName, byte[] row)
public RegionAdminServiceCallable(ClusterConnection connection, RpcControllerFactory rpcControllerFactory, HRegionLocation location, TableName tableName, byte[] row, int replicaId)
public void prepare(boolean reload)
             throws IOException
RetryingCallableprepare in interface RetryingCallable<T>reload - Set this to true if need to requery locationsIOException - eprotected void setStub(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface stub)
public HRegionLocation getLocation(boolean useCache) throws IOException
IOExceptionpublic void throwable(Throwable t, boolean retrying)
RetryingCallablethrowable in interface RetryingCallable<T>t - throwable which was thrownretrying - True if we are in retrying mode (we are not in retrying mode when max retries
                 == 1; we ARE in retrying mode if retries > 1 even when we are the last
                 attempt)protected String getExceptionMessage()
public String getExceptionMessageAdditionalDetail()
RetryingCallablegetExceptionMessageAdditionalDetail in interface RetryingCallable<T>public long sleep(long pause,
                  int tries)
RetryingCallablesleep in interface RetryingCallable<T>pause - time to pausetries - amount of tries until till sleeppublic static RegionLocations getRegionLocations(ClusterConnection connection, TableName tableName, byte[] row, boolean useCache, int replicaId) throws RetriesExhaustedException, DoNotRetryIOException, InterruptedIOException
public T call(int callTimeout) throws IOException
Exception to IOException. It also does
 setup of an rpcController and calls through to the unimplemented
 call(PayloadCarryingRpcController) method; implement this method to add your rpc invocation.call in interface RetryingCallable<T>callTimeout - - the time available for this call. 0 for infinite.IOExceptionprotected abstract T call(HBaseRpcController rpcController) throws Exception
rpcController - PayloadCarryingRpcController is a mouthful but it at a minimum is a facade
                      on protobuf so we don't have to put protobuf everywhere; we can keep it
                      behind this class.ExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.