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, Iterable<Result>, ResultScanner
- Direct Known Subclasses:
- ClientSmallReversedScanner
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class ReversedClientScanner
- extends ClientScanner
A reversed client scanner which support backward scanning
Fields inherited from class org.apache.hadoop.hbase.client.ClientScanner |
cache, caching, callable, caller, closed, currentRegion, lastNext, lastResult, maxScannerResultSize, rpcControllerFactory, scan, scanMetricsPublished, scannerTimeout |
Constructor Summary |
ReversedClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
HConnection connection)
Create a new ReversibleClientScanner for the specified table Note that the
passed Scan 's start row maybe changed. |
Methods inherited from class org.apache.hadoop.hbase.client.ClientScanner |
close, getCacheSize, getConnection, getMaxResultSize, getScan, getScannerCallable, getTable, getTableName, getTimestamp, initializeScannerInConstruction, loadCache, next, renewLease, writeScanMetrics |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReversedClientScanner
public ReversedClientScanner(org.apache.hadoop.conf.Configuration conf,
Scan scan,
TableName tableName,
HConnection connection)
throws IOException
- Create a new ReversibleClientScanner for the specified table Note that the
passed
Scan
's start row maybe changed.
- Parameters:
conf
- The Configuration
to use.scan
- Scan
to use in this scannertableName
- The table that we wish to scanconnection
- Connection identifying the cluster
- Throws:
IOException
nextScanner
protected boolean nextScanner(int nbRows,
boolean done)
throws IOException
- Overrides:
nextScanner
in class ClientScanner
- Throws:
IOException
getScannerCallable
protected ScannerCallable getScannerCallable(byte[] localStartKey,
int nbRows,
byte[] locateStartRow)
checkScanStopRow
protected boolean checkScanStopRow(byte[] startKey)
- Overrides:
checkScanStopRow
in class ClientScanner
createClosestRowBefore
protected byte[] createClosestRowBefore(byte[] row)
- Create the closest row before the specified row
- Parameters:
row
-
- Returns:
- a new byte array which is the closest front row of the specified one
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.