@InterfaceAudience.Private public class ScannerCallable extends RegionServerCallable<Result[]>
ResultScanner
s made by HTable
. Passed to a retrying caller such as
RpcRetryingCaller
so fails are retried.Modifier and Type | Field and Description |
---|---|
protected PayloadCarryingRpcController |
controller |
protected boolean |
instantiated |
protected boolean |
isRegionServerRemote |
static org.apache.commons.logging.Log |
LOG |
static String |
LOG_SCANNER_ACTIVITY |
static String |
LOG_SCANNER_LATENCY_CUTOFF |
protected ScanMetrics |
scanMetrics |
connection, location, MIN_WAIT_DEAD_SERVER, row, tableName
Constructor and Description |
---|
ScannerCallable(HConnection connection,
byte[] tableName,
Scan scan,
ScanMetrics scanMetrics)
|
ScannerCallable(HConnection connection,
TableName tableName,
Scan scan,
ScanMetrics scanMetrics,
PayloadCarryingRpcController controller) |
Modifier and Type | Method and Description |
---|---|
Result[] |
call() |
protected void |
checkIfRegionServerIsRemote()
compare the local machine hostname with region server's hostname
to decide if hbase client connects to a remote region server
|
int |
getCaching()
Get the number of rows that will be fetched on next
|
HRegionInfo |
getHRegionInfo() |
protected Scan |
getScan() |
protected long |
openScanner() |
void |
prepare(boolean reload)
Prepare for connection to the server hosting region with row from tablename.
|
void |
setCaching(int caching)
Set the number of rows that will be fetched on next
|
void |
setClose()
Call this when the next invocation of call should close the scanner
|
getExceptionMessageAdditionalDetail, getLocation, getRow, getStub, getTableName, setLocation, sleep, throwable
public static final String LOG_SCANNER_LATENCY_CUTOFF
public static final String LOG_SCANNER_ACTIVITY
public static final org.apache.commons.logging.Log LOG
protected boolean instantiated
protected ScanMetrics scanMetrics
protected boolean isRegionServerRemote
protected final PayloadCarryingRpcController controller
public ScannerCallable(HConnection connection, TableName tableName, Scan scan, ScanMetrics scanMetrics, PayloadCarryingRpcController controller)
connection
- which connectiontableName
- table callable is onscan
- the scan to executescanMetrics
- the ScanMetrics to used, if it is null, ScannerCallable won't collect
metricscontroller
- to use when writing the rpc@Deprecated public ScannerCallable(HConnection connection, byte[] tableName, Scan scan, ScanMetrics scanMetrics)
public void prepare(boolean reload) throws IOException
RegionServerCallable
prepare
in interface RetryingCallable<Result[]>
prepare
in class RegionServerCallable<Result[]>
reload
- force reload of server locationIOException
protected void checkIfRegionServerIsRemote()
public Result[] call() throws IOException
IOException
Callable.call()
protected long openScanner() throws IOException
IOException
protected Scan getScan()
public void setClose()
public HRegionInfo getHRegionInfo()
getHRegionInfo
in class RegionServerCallable<Result[]>
public int getCaching()
public void setCaching(int caching)
caching
- the number of rows for cachingCopyright © 2015 The Apache Software Foundation. All Rights Reserved.