org.apache.hadoop.hbase.regionserver
Class MemStore.MemStoreScanner

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.MemStore.MemStoreScanner
All Implemented Interfaces:
KeyValueScanner
Enclosing class:
MemStore

protected class MemStore.MemStoreScanner
extends Object
implements KeyValueScanner


Method Summary
 void close()
          Close the KeyValue scanner.
protected  KeyValue getLower(KeyValue first, KeyValue second)
           
protected  KeyValue getLowest()
           
protected  KeyValue getNext(Iterator<KeyValue> it)
           
 long getSequenceID()
          MemStoreScanner returns max value as sequence id because it will always have the latest data among all files.
 KeyValue next()
          Return the next KeyValue in this scanner, iterating the scanner
 KeyValue peek()
          Look at the next KeyValue in this scanner, but do not iterate scanner.
 boolean reseek(KeyValue key)
          Reseek the scanner at or after the specified KeyValue.
 boolean seek(KeyValue key)
          Seek the scanner at or after the specified KeyValue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNext

protected KeyValue getNext(Iterator<KeyValue> it)

seek

public boolean seek(KeyValue key)
Description copied from interface: KeyValueScanner
Seek the scanner at or after the specified KeyValue.

Specified by:
seek in interface KeyValueScanner
Parameters:
key - seek value
Returns:
true if scanner has values left, false if end of scanner

reseek

public boolean reseek(KeyValue key)
Description copied from interface: KeyValueScanner
Reseek the scanner at or after the specified KeyValue. This method is guaranteed to seek to or before the required key only if the key comes after the current position of the scanner. Should not be used to seek to a key which may come before the current position.

Specified by:
reseek in interface KeyValueScanner
Parameters:
key - seek value (should be non-null)
Returns:
true if scanner has values left, false if end of scanner

peek

public KeyValue peek()
Description copied from interface: KeyValueScanner
Look at the next KeyValue in this scanner, but do not iterate scanner.

Specified by:
peek in interface KeyValueScanner
Returns:
the next KeyValue

next

public KeyValue next()
Description copied from interface: KeyValueScanner
Return the next KeyValue in this scanner, iterating the scanner

Specified by:
next in interface KeyValueScanner
Returns:
the next KeyValue

getLowest

protected KeyValue getLowest()

getLower

protected KeyValue getLower(KeyValue first,
                            KeyValue second)

close

public void close()
Description copied from interface: KeyValueScanner
Close the KeyValue scanner.

Specified by:
close in interface KeyValueScanner

getSequenceID

public long getSequenceID()
MemStoreScanner returns max value as sequence id because it will always have the latest data among all files.

Specified by:
getSequenceID in interface KeyValueScanner


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.