@InterfaceAudience.Private public class ClientSmallScanner extends ClientScanner
ClientScanner| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ClientSmallScanner.SmallScannerCallable |
protected static class |
ClientSmallScanner.SmallScannerCallableFactory |
| Modifier and Type | Field and Description |
|---|---|
private ClientSmallScanner.SmallScannerCallableFactory |
callableFactory |
private static org.apache.commons.logging.Log |
LOG |
private ScannerCallableWithReplicas |
smallScanCallable |
cache, caching, callable, caller, closed, conf, currentRegion, lastCellLoadedToCache, lastNext, lastResult, MAX_BYTE_ARRAY, maxScannerResultSize, partialResults, partialResultsRow, pool, primaryOperationTimeout, rpcControllerFactory, scan, scanMetricsPublished, scannerTimeoutscanMetrics| Constructor and Description |
|---|
ClientSmallScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
ClusterConnection connection,
RpcRetryingCallerFactory rpcFactory,
RpcControllerFactory controllerFactory,
ExecutorService pool,
int primaryOperationTimeout)
Create a new ShortClientScanner for the specified table.
|
ClientSmallScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
ClusterConnection connection,
RpcRetryingCallerFactory rpcFactory,
RpcControllerFactory controllerFactory,
ExecutorService pool,
int primaryOperationTimeout,
ClientSmallScanner.SmallScannerCallableFactory callableFactory)
Create a new ShortClientScanner for the specified table.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the scanner and releases any resources it has allocated
|
protected void |
initializeScannerInConstruction() |
protected void |
loadCache()
Contact the servers to load more
Results in the cache. |
Result |
next()
Grab the next row's worth of values.
|
private boolean |
nextScanner(int nbRows,
boolean done,
boolean currentRegionDone)
Gets a scanner for following scan.
|
protected void |
setScannerCallableFactory(ClientSmallScanner.SmallScannerCallableFactory callableFactory) |
call, checkScanStopRow, createClosestRowBefore, getCacheSize, getCaching, getConf, getConnection, getMaxResultSize, getPool, getPrimaryOperationTimeout, getResultsToAddToCache, getRetries, getScan, getScannerCallable, getScannerTimeout, getTable, getTableName, getTimestamp, isAnyRPCcancelled, nextScanner, renewLease, updateLastCellLoadedToCache, writeScanMetricsgetScanMetrics, initScanMetrics, iterator, nextprivate static final org.apache.commons.logging.Log LOG
private ScannerCallableWithReplicas smallScanCallable
private ClientSmallScanner.SmallScannerCallableFactory callableFactory
public ClientSmallScanner(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 rangeGetconnection - Connection identifying the clusterrpcFactory - Factory used to create the RpcRetryingCallercontrollerFactory - Factory used to access RPC payloadspool - Threadpool for RPC threadsprimaryOperationTimeout - Call timeoutIOException - If the remote call failsClientSmallScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
ClusterConnection connection,
RpcRetryingCallerFactory rpcFactory,
RpcControllerFactory controllerFactory,
ExecutorService pool,
int primaryOperationTimeout,
ClientSmallScanner.SmallScannerCallableFactory callableFactory)
throws IOException
Scan
's start row maybe changed changed. Intended for unit tests to provide their own
ClientSmallScanner.SmallScannerCallableFactory implementation/mock.conf - The Configuration to use.scan - Scan to use in this scannertableName - The table that we wish to rangeGetconnection - Connection identifying the clusterrpcFactory - Factory used to create the RpcRetryingCallercontrollerFactory - Factory used to access RPC payloadspool - Threadpool for RPC threadsprimaryOperationTimeout - Call timeoutcallableFactory - Factory used to create the ClientSmallScanner.SmallScannerCallableIOExceptionprotected void initializeScannerInConstruction()
throws IOException
initializeScannerInConstruction in class ClientScannerIOExceptionprivate boolean nextScanner(int nbRows,
boolean done,
boolean currentRegionDone)
throws IOException
nbRows - done - true if Server-side says we're done scanning.currentRegionDone - true if scan is over on current regionIOExceptionpublic Result next() throws IOException
ResultScannernext in interface ResultScannernext in class ClientScannerIOException - eprotected void loadCache()
throws IOException
ClientScannerResults in the cache.loadCache in class ClientScannerIOExceptionpublic void close()
ResultScannerclose in interface Closeableclose in interface AutoCloseableclose in interface ResultScannerclose in class ClientScannerprotected void setScannerCallableFactory(ClientSmallScanner.SmallScannerCallableFactory callableFactory)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.