Package org.apache.hadoop.hbase.client
Class ReversedClientScanner
java.lang.Object
org.apache.hadoop.hbase.client.AbstractClientScanner
org.apache.hadoop.hbase.client.ClientScanner
org.apache.hadoop.hbase.client.ReversedClientScanner
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<Result>
,ResultScanner
A reversed client scanner which support backward scanning
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.client.ClientScanner
cache, caching, callable, caller, closed, conf, currentRegion, lastNext, lastResult, maxScannerResultSize, pool, primaryOperationTimeout, readRpcTimeout, requestAttributes, rpcControllerFactory, scan, scanMetricsPublished, scannerTimeout, span, tableName
Fields inherited from class org.apache.hadoop.hbase.client.AbstractClientScanner
scanMetrics
-
Constructor Summary
ConstructorDescriptionReversedClientScanner
(org.apache.hadoop.conf.Configuration conf, Scan scan, Scan scanForMetrics, TableName tableName, ClusterConnection connection, RpcRetryingCallerFactory rpcFactory, RpcControllerFactory controllerFactory, ExecutorService pool, int scanReadRpcTimeout, int scannerTimeout, int primaryOperationTimeout, ConnectionConfiguration connectionConfiguration, Map<String, byte[]> requestAttributes) Create a new ReversibleClientScanner for the specified table Note that the passedScan
's start row maybe changed. -
Method Summary
Modifier and TypeMethodDescriptionprotected ReversedScannerCallable
Will be called in moveToNextRegion to create ScannerCallable.protected boolean
Will be called in moveToNextRegion when currentRegion is null.Methods inherited from class org.apache.hadoop.hbase.client.ClientScanner
addEstimatedSize, close, getCacheCount, getCacheSize, getCaching, getConf, getConnection, getMaxResultSize, getPool, getPrimaryOperationTimeout, getRetries, getScan, getScannerTimeout, getScanReplicaId, getTable, getTimestamp, initCache, initSyncCache, isAnyRPCcancelled, loadCache, moveToNextRegion, next, nextWithSyncCache, renewLease, writeScanMetrics
Methods inherited from class org.apache.hadoop.hbase.client.AbstractClientScanner
getScanMetrics, initScanMetrics
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.hadoop.hbase.client.ResultScanner
iterator, next
-
Constructor Details
-
ReversedClientScanner
public ReversedClientScanner(org.apache.hadoop.conf.Configuration conf, Scan scan, Scan scanForMetrics, TableName tableName, ClusterConnection connection, RpcRetryingCallerFactory rpcFactory, RpcControllerFactory controllerFactory, ExecutorService pool, int scanReadRpcTimeout, int scannerTimeout, int primaryOperationTimeout, ConnectionConfiguration connectionConfiguration, Map<String, byte[]> requestAttributes) throws IOExceptionCreate a new ReversibleClientScanner for the specified table Note that the passedScan
's start row maybe changed.- Throws:
IOException
-
-
Method Details
-
setNewStartKey
Description copied from class:ClientScanner
Will be called in moveToNextRegion when currentRegion is null. Abstract because for normal scan, we will start next scan from the endKey of the currentRegion, and for reversed scan, we will start next scan from the startKey of the currentRegion.- Specified by:
setNewStartKey
in classClientScanner
- Returns:
false
if we have reached the stop row. Otherwisetrue
.
-
createScannerCallable
Description copied from class:ClientScanner
Will be called in moveToNextRegion to create ScannerCallable. Abstract because for reversed scan we need to create a ReversedScannerCallable.- Specified by:
createScannerCallable
in classClientScanner
-