@InterfaceAudience.Private public abstract class ClientScanner extends AbstractClientScanner
| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<Result> |
cache |
protected int |
caching |
protected org.apache.hadoop.hbase.client.ScannerCallableWithReplicas |
callable |
protected RpcRetryingCaller<Result[]> |
caller |
protected boolean |
closed |
protected org.apache.hadoop.conf.Configuration |
conf |
protected HRegionInfo |
currentRegion |
protected long |
lastNext |
protected Result |
lastResult |
protected long |
maxScannerResultSize |
protected ExecutorService |
pool |
protected int |
primaryOperationTimeout |
protected RpcControllerFactory |
rpcControllerFactory |
protected Scan |
scan |
protected boolean |
scanMetricsPublished |
protected int |
scannerTimeout |
scanMetrics| Constructor and Description |
|---|
ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
ClusterConnection connection,
RpcRetryingCallerFactory rpcFactory,
RpcControllerFactory controllerFactory,
ExecutorService pool,
int primaryOperationTimeout)
Create a new ClientScanner for the specified table Note that the passed
Scan's start
row maybe changed changed. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the scanner and releases any resources it has allocated
|
protected abstract ScannerCallable |
createScannerCallable()
Will be called in moveToNextRegion to create ScannerCallable.
|
int |
getCacheSize() |
protected int |
getCaching() |
protected org.apache.hadoop.conf.Configuration |
getConf() |
protected ClusterConnection |
getConnection() |
protected long |
getMaxResultSize() |
protected ExecutorService |
getPool() |
protected int |
getPrimaryOperationTimeout() |
protected int |
getRetries() |
protected Scan |
getScan() |
protected int |
getScannerTimeout() |
protected TableName |
getTable() |
protected byte[] |
getTableName()
Deprecated.
As of release 0.96
(HBASE-9508). This
will be removed in HBase 2.0.0. Use
getTable(). |
protected long |
getTimestamp() |
protected void |
loadCache()
Contact the servers to load more
Results in the cache. |
protected boolean |
moveToNextRegion()
Close the previous scanner and create a new ScannerCallable for the next scanner.
|
Result |
next()
Grab the next row's worth of values.
|
boolean |
renewLease()
Allow the client to renew the scanner's lease on the server.
|
protected abstract boolean |
setNewStartKey()
Will be called in moveToNextRegion when currentRegion is null.
|
protected void |
writeScanMetrics()
Publish the scan metrics.
|
getScanMetrics, initScanMetrics, iterator, nextprotected final Scan scan
protected boolean closed
protected HRegionInfo currentRegion
protected org.apache.hadoop.hbase.client.ScannerCallableWithReplicas callable
protected final LinkedList<Result> cache
protected final int caching
protected long lastNext
protected Result lastResult
protected final long maxScannerResultSize
protected final int scannerTimeout
protected boolean scanMetricsPublished
protected RpcRetryingCaller<Result[]> caller
protected RpcControllerFactory rpcControllerFactory
protected org.apache.hadoop.conf.Configuration conf
protected final int primaryOperationTimeout
protected final ExecutorService pool
public ClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
ClusterConnection connection,
RpcRetryingCallerFactory rpcFactory,
RpcControllerFactory controllerFactory,
ExecutorService pool,
int primaryOperationTimeout)
throws IOException
Scan's start
row maybe changed changed.conf - The Configuration to use.scan - Scan to use in this scannertableName - The table that we wish to scanconnection - Connection identifying the clusterIOExceptionprotected ClusterConnection getConnection()
@Deprecated protected byte[] getTableName()
protected TableName getTable()
protected int getRetries()
protected int getScannerTimeout()
protected org.apache.hadoop.conf.Configuration getConf()
protected Scan getScan()
protected ExecutorService getPool()
protected int getPrimaryOperationTimeout()
protected int getCaching()
protected long getTimestamp()
protected long getMaxResultSize()
protected abstract boolean setNewStartKey()
false if we have reached the stop row. Otherwise true.protected abstract ScannerCallable createScannerCallable()
protected boolean moveToNextRegion()
Marked as protected only because TestClientScanner need to override this method.
protected void writeScanMetrics()
Scan.setScanMetricsEnabled(boolean)public Result next() throws IOException
ResultScannerIOException - epublic int getCacheSize()
protected void loadCache()
throws IOException
Results in the cache.IOExceptionpublic void close()
ResultScannerpublic boolean renewLease()
ResultScannerCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.