org.apache.hadoop.hbase.client
Class ReversedClientScanner

java.lang.Object
  extended by org.apache.hadoop.hbase.client.AbstractClientScanner
      extended by org.apache.hadoop.hbase.client.ClientScanner
          extended by 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


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.client.ClientScanner
cache, caching, callable, caller, closed, currentRegion, lastNext, lastResult, maxScannerResultSize, rpcControllerFactory, scan, scanMetricsPublished, scannerTimeout
 
Fields inherited from class org.apache.hadoop.hbase.client.AbstractClientScanner
scanMetrics
 
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.
 
Method Summary
protected  boolean checkScanStopRow(byte[] startKey)
           
protected  byte[] createClosestRowBefore(byte[] row)
          Create the closest row before the specified row
protected  ScannerCallable getScannerCallable(byte[] localStartKey, int nbRows, byte[] locateStartRow)
           
protected  boolean nextScanner(int nbRows, boolean done)
           
 
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 org.apache.hadoop.hbase.client.AbstractClientScanner
getScanMetrics, initScanMetrics, iterator, next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 scanner
tableName - The table that we wish to scan
connection - Connection identifying the cluster
Throws:
IOException
Method Detail

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.