org.apache.hadoop.hbase.client
Class ScannerCallable
java.lang.Object
org.apache.hadoop.hbase.client.RegionServerCallable<Result[]>
org.apache.hadoop.hbase.client.ScannerCallable
- All Implemented Interfaces:
- Callable<Result[]>, RetryingCallable<Result[]>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class ScannerCallable
- extends RegionServerCallable<Result[]>
Scanner operations such as create, next, etc.
Used by ResultScanners made by HTable. Passed to a retrying caller such as
RpcRetryingCaller so fails are retried.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG_SCANNER_LATENCY_CUTOFF
public static final String LOG_SCANNER_LATENCY_CUTOFF
- See Also:
- Constant Field Values
LOG_SCANNER_ACTIVITY
public static final String LOG_SCANNER_ACTIVITY
- See Also:
- Constant Field Values
LOG
public static final org.apache.commons.logging.Log LOG
ScannerCallable
public ScannerCallable(HConnection connection,
TableName tableName,
Scan scan,
ScanMetrics scanMetrics)
- Parameters:
connection - which connectiontableName - table callable is onscan - the scan to executescanMetrics - the ScanMetrics to used, if it is null, ScannerCallable
won't collect metrics
prepare
public void prepare(boolean reload)
throws IOException
- Description copied from class:
RegionServerCallable
- Prepare for connection to the server hosting region with row from tablename. Does lookup
to find region location and hosting server.
- Specified by:
prepare in interface RetryingCallable<Result[]>- Overrides:
prepare in class RegionServerCallable<Result[]>
- Parameters:
reload - force reload of server location
- Throws:
IOException
call
public Result[] call()
throws IOException
- Throws:
IOException- See Also:
Callable.call()
openScanner
protected long openScanner()
throws IOException
- Throws:
IOException
getScan
protected Scan getScan()
setClose
public void setClose()
- Call this when the next invocation of call should close the scanner
getHRegionInfo
public HRegionInfo getHRegionInfo()
- Returns:
- the HRegionInfo for the current region
getCaching
public int getCaching()
- Get the number of rows that will be fetched on next
- Returns:
- the number of rows for caching
setCaching
public void setCaching(int caching)
- Set the number of rows that will be fetched on next
- Parameters:
caching - the number of rows for caching
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.