public class ScannerCallable extends ServerCallable<Result[]>
ResultScanner
s made by HTable
.Modifier and Type | Field and Description |
---|---|
static String |
LOG_SCANNER_ACTIVITY |
static String |
LOG_SCANNER_LATENCY_CUTOFF |
callTimeout, connection, endTime, globalStartTime, location, MIN_RPC_TIMEOUT, row, server, startTime, tableName
Constructor and Description |
---|
ScannerCallable(HConnection connection,
byte[] tableName,
Scan scan,
ScanMetrics scanMetrics) |
Modifier and Type | Method and Description |
---|---|
Result[] |
call() |
void |
connect(boolean reload)
Connect to the server hosting region with row from tablename.
|
int |
getCaching()
Get the number of rows that will be fetched on next
|
HRegionInfo |
getHRegionInfo() |
protected Scan |
getScan() |
protected long |
openScanner() |
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
|
afterCall, beforeCall, getRegionName, getRow, getServerName, withoutRetries, withRetries
public static final String LOG_SCANNER_LATENCY_CUTOFF
public static final String LOG_SCANNER_ACTIVITY
public ScannerCallable(HConnection connection, byte[] tableName, Scan scan, ScanMetrics scanMetrics)
connection
- which connectiontableName
- table callable is onscan
- the scan to executescanMetrics
- the ScanMetrics to used, if it is null, ScannerCallable
won't collect metricspublic void connect(boolean reload) throws IOException
ServerCallable
connect
in class ServerCallable<Result[]>
reload
- force reload of server locationIOException
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 ServerCallable<Result[]>
public int getCaching()
public void setCaching(int caching)
caching
- the number of rows for cachingCopyright © 2014 The Apache Software Foundation. All Rights Reserved.