@InterfaceAudience.Private public abstract class RegionAdminServiceCallable<T> extends Object implements RetryingCallable<T>
RegionServerCallable
but for the AdminService interface. This service callable
assumes a Table and row and thus does region locating similar to RegionServerCallable.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.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 String |
getExceptionMessage() |
String |
getExceptionMessageAdditionalDetail() |
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
RetryingCallable.call(int) invocation. |
protected void |
setStub(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface stub) |
long |
sleep(long pause,
int tries) |
void |
throwable(Throwable t,
boolean retrying)
Called when
RetryingCallable.call(int) 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.). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
call
protected final ClusterConnection connection
protected final RpcControllerFactory rpcControllerFactory
protected org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface stub
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
RetryingCallable
RetryingCallable.call(int)
invocation.prepare
in interface RetryingCallable<T>
reload
- Set this to true if need to requery locationsIOException
- eprotected void setStub(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.AdminService.BlockingInterface stub)
public HRegionLocation getLocation(boolean useCache) throws IOException
IOException
public void throwable(Throwable t, boolean retrying)
RetryingCallable
RetryingCallable.call(int)
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.).throwable
in interface RetryingCallable<T>
retrying
- 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()
getExceptionMessageAdditionalDetail
in interface RetryingCallable<T>
public long sleep(long pause, int tries)
sleep
in interface RetryingCallable<T>
public static RegionLocations getRegionLocations(ClusterConnection connection, TableName tableName, byte[] row, boolean useCache, int replicaId) throws RetriesExhaustedException, DoNotRetryIOException, InterruptedIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.