T - the class that the ServerCallable handles@InterfaceAudience.Private public abstract class RegionServerCallable<T> extends Object implements RetryingCallable<T>
Callable.call().
Passed to a RpcRetryingCaller so we retry on fail.| Modifier and Type | Field and Description |
|---|---|
protected HConnection |
connection |
protected HRegionLocation |
location |
protected static int |
MIN_WAIT_DEAD_SERVER |
protected byte[] |
row |
protected TableName |
tableName |
| Constructor and Description |
|---|
RegionServerCallable(HConnection connection,
TableName tableName,
byte[] row) |
| Modifier and Type | Method and Description |
|---|---|
String |
getExceptionMessageAdditionalDetail() |
HRegionInfo |
getHRegionInfo() |
protected HRegionLocation |
getLocation() |
byte[] |
getRow() |
protected ClientProtos.ClientService.BlockingInterface |
getStub() |
TableName |
getTableName() |
void |
prepare(boolean reload)
Prepare for connection to the server hosting region with row from tablename.
|
protected void |
setLocation(HRegionLocation location) |
long |
sleep(long pause,
int tries) |
void |
throwable(Throwable t,
boolean retrying)
Called when
Callable.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 final HConnection connection
protected final TableName tableName
protected final byte[] row
protected HRegionLocation location
protected static final int MIN_WAIT_DEAD_SERVER
public RegionServerCallable(HConnection connection, TableName tableName, byte[] row)
connection - Connection to use.tableName - Table name to which row belongs.row - The row we want in tableName.public void prepare(boolean reload)
throws IOException
prepare in interface RetryingCallable<T>reload - Set this to true if connection should re-find the regionIOException - eprotected ClientProtos.ClientService.BlockingInterface getStub()
protected HRegionLocation getLocation()
protected void setLocation(HRegionLocation location)
public TableName getTableName()
public byte[] getRow()
public void throwable(Throwable t, boolean retrying)
RetryingCallableCallable.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.).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)public String getExceptionMessageAdditionalDetail()
getExceptionMessageAdditionalDetail in interface RetryingCallable<T>public long sleep(long pause,
int tries)
sleep in interface RetryingCallable<T>public HRegionInfo getHRegionInfo()
Copyright © 2014 The Apache Software Foundation. All rights reserved.