T - the class that the ServerCallable handles@InterfaceAudience.Private public abstract class AsyncRegionServerCallable<T> extends java.lang.Object implements AsyncRetryingCallable<T>
AsyncRetryingCallable.call(ResponseHandler).
Passed to a RpcRetryingCaller so we retry on fail.| Modifier and Type | Field and Description |
|---|---|
protected AsyncRpcClient |
client |
protected org.apache.hadoop.hbase.client.HConnection |
connection |
protected org.apache.hadoop.hbase.HRegionLocation |
location |
protected static int |
MIN_WAIT_DEAD_SERVER |
protected byte[] |
row |
protected org.apache.hadoop.hbase.TableName |
tableName |
| Constructor and Description |
|---|
AsyncRegionServerCallable(AsyncRpcClient client,
org.apache.hadoop.hbase.TableName tableName,
byte[] row) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getExceptionMessageAdditionalDetail() |
org.apache.hadoop.hbase.HRegionInfo |
getHRegionInfo() |
protected org.apache.hadoop.hbase.HRegionLocation |
getLocation() |
byte[] |
getRow() |
protected org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService.Interface |
getStub() |
org.apache.hadoop.hbase.TableName |
getTableName() |
void |
prepare(boolean reload)
Prepare for connection to the server hosting region with row from tablename.
|
protected void |
setLocation(org.apache.hadoop.hbase.HRegionLocation location) |
long |
sleep(long pause,
int tries) |
void |
throwable(java.lang.Throwable t,
boolean retrying)
Called when
AsyncRetryingCallable.call(ResponseHandler) 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, waitcallprotected final org.apache.hadoop.hbase.client.HConnection connection
protected final org.apache.hadoop.hbase.TableName tableName
protected final byte[] row
protected final AsyncRpcClient client
protected org.apache.hadoop.hbase.HRegionLocation location
protected static final int MIN_WAIT_DEAD_SERVER
public AsyncRegionServerCallable(AsyncRpcClient client, org.apache.hadoop.hbase.TableName tableName, byte[] row)
client - RPC client to use.tableName - Table name to which row belongs.row - The row we want in tableName.public void prepare(boolean reload)
throws java.io.IOException
prepare in interface AsyncRetryingCallable<T>reload - Set this to true if connection should re-find the regionjava.io.IOException - eprotected org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService.Interface getStub()
protected org.apache.hadoop.hbase.HRegionLocation getLocation()
protected void setLocation(org.apache.hadoop.hbase.HRegionLocation location)
public org.apache.hadoop.hbase.TableName getTableName()
public byte[] getRow()
public void throwable(java.lang.Throwable t,
boolean retrying)
AsyncRetryingCallableAsyncRetryingCallable.call(ResponseHandler) 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 AsyncRetryingCallable<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)public java.lang.String getExceptionMessageAdditionalDetail()
getExceptionMessageAdditionalDetail in interface AsyncRetryingCallable<T>public long sleep(long pause,
int tries)
sleep in interface AsyncRetryingCallable<T>pause - before retrytries - count of triespublic org.apache.hadoop.hbase.HRegionInfo getHRegionInfo()