org.apache.hadoop.hbase.regionserver
Class NonReversedNonLazyKeyValueScanner

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.NonLazyKeyValueScanner
      extended by org.apache.hadoop.hbase.regionserver.NonReversedNonLazyKeyValueScanner
All Implemented Interfaces:
KeyValueScanner
Direct Known Subclasses:
CollectionBackedScanner, KeyValueHeap, StoreScanner

@InterfaceAudience.Private
public abstract class NonReversedNonLazyKeyValueScanner
extends NonLazyKeyValueScanner

A "non-reversed & non-lazy" scanner which does not support backward scanning and always does a real seek operation. Most scanners are inherited from this class.


Constructor Summary
NonReversedNonLazyKeyValueScanner()
           
 
Method Summary
 boolean backwardSeek(KeyValue key)
          Seek the scanner at or before the row of specified KeyValue, it firstly tries to seek the scanner at or after the specified KeyValue, return if peek KeyValue of scanner has the same row with specified KeyValue, otherwise seek the scanner at the first KeyValue of the row which is the previous row of specified KeyValue
 boolean seekToLastRow()
          Seek the scanner at the first KeyValue of last row
 boolean seekToPreviousRow(KeyValue key)
          Seek the scanner at the first KeyValue of the row which is the previous row of specified key
 
Methods inherited from class org.apache.hadoop.hbase.regionserver.NonLazyKeyValueScanner
doRealSeek, enforceSeek, getNextIndexedKey, isFileScanner, realSeekDone, requestSeek, shouldUseScanner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hbase.regionserver.KeyValueScanner
close, getSequenceID, next, peek, reseek, seek
 

Constructor Detail

NonReversedNonLazyKeyValueScanner

public NonReversedNonLazyKeyValueScanner()
Method Detail

backwardSeek

public boolean backwardSeek(KeyValue key)
                     throws IOException
Description copied from interface: KeyValueScanner
Seek the scanner at or before the row of specified KeyValue, it firstly tries to seek the scanner at or after the specified KeyValue, return if peek KeyValue of scanner has the same row with specified KeyValue, otherwise seek the scanner at the first KeyValue of the row which is the previous row of specified KeyValue

Parameters:
key - seek KeyValue
Returns:
true if the scanner is at the valid KeyValue, false if such KeyValue does not exist
Throws:
IOException

seekToPreviousRow

public boolean seekToPreviousRow(KeyValue key)
                          throws IOException
Description copied from interface: KeyValueScanner
Seek the scanner at the first KeyValue of the row which is the previous row of specified key

Parameters:
key - seek value
Returns:
true if the scanner at the first valid KeyValue of previous row, false if not existing such KeyValue
Throws:
IOException

seekToLastRow

public boolean seekToLastRow()
                      throws IOException
Description copied from interface: KeyValueScanner
Seek the scanner at the first KeyValue of last row

Returns:
true if scanner has values left, false if the underlying data is empty
Throws:
IOException


Copyright © 2015 The Apache Software Foundation. All rights reserved.