org.apache.hadoop.hbase.regionserver
Class MinorCompactingStoreScanner

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.MinorCompactingStoreScanner
All Implemented Interfaces:
Closeable, InternalScanner, KeyValueScanner

public class MinorCompactingStoreScanner
extends Object
implements KeyValueScanner, InternalScanner

A scanner that does a minor compaction at the same time. Doesn't need to implement ChangedReadersObserver, since it doesn't scan memstore, only store files and optionally the memstore-snapshot.


Method Summary
 void close()
          Close the KeyValue scanner.
 KeyValue next()
          Return the next KeyValue in this scanner, iterating the scanner
 boolean next(List<KeyValue> results)
          Grab the next row's worth of values.
 boolean next(List<KeyValue> results, int limit)
          Grab the next row's worth of values with a limit on the number of values to return.
 boolean next(StoreFile.Writer writer)
          High performance merge scan.
 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

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()
              throws IOException
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
Throws:
IOException

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

next

public boolean next(StoreFile.Writer writer)
             throws IOException
High performance merge scan.

Parameters:
writer -
Returns:
True if more.
Throws:
IOException

next

public boolean next(List<KeyValue> results)
             throws IOException
Description copied from interface: InternalScanner
Grab the next row's worth of values.

Specified by:
next in interface InternalScanner
Parameters:
results - return output array
Returns:
true if more rows exist after this one, false if scanner is done
Throws:
IOException - e

next

public boolean next(List<KeyValue> results,
                    int limit)
             throws IOException
Description copied from interface: InternalScanner
Grab the next row's worth of values with a limit on the number of values to return.

Specified by:
next in interface InternalScanner
Parameters:
results - return output array
limit - limit on row count to get
Returns:
true if more rows exist after this one, false if scanner is done
Throws:
IOException - e

close

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

Specified by:
close in interface Closeable
Specified by:
close in interface InternalScanner
Specified by:
close in interface KeyValueScanner


Copyright © 2010 Apache Software Foundation. All Rights Reserved.