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, tableNameFields inherited from class org.apache.hadoop.hbase.client.AbstractClientScanner
scanMetrics -
Constructor Summary
ConstructorsConstructorDescriptionReversedClientScanner(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 ReversedScannerCallableWill be called in moveToNextRegion to create ScannerCallable.protected booleanWill 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, writeScanMetricsMethods inherited from class org.apache.hadoop.hbase.client.AbstractClientScanner
getScanMetrics, initScanMetricsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods 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:ClientScannerWill 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:
setNewStartKeyin classClientScanner- Returns:
falseif we have reached the stop row. Otherwisetrue.
-
createScannerCallable
Description copied from class:ClientScannerWill be called in moveToNextRegion to create ScannerCallable. Abstract because for reversed scan we need to create a ReversedScannerCallable.- Specified by:
createScannerCallablein classClientScanner
-