public class StoreScanner extends NonLazyKeyValueScanner implements KeyValueScanner, InternalScanner, ChangedReadersObserver
Constructor and Description |
---|
StoreScanner(Store store,
Store.ScanInfo scanInfo,
Scan scan,
List<? extends KeyValueScanner> scanners,
ScanType scanType,
long smallestReadPoint,
long earliestPutTs)
Used for major compactions.
|
StoreScanner(Store store,
Store.ScanInfo scanInfo,
Scan scan,
NavigableSet<byte[]> columns)
Opens a scanner across memstore, snapshot, and all StoreFiles.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the KeyValue scanner.
|
long |
getSequenceID()
Get the sequence id associated with this KeyValueScanner.
|
KeyValue |
next()
Return the next KeyValue in this scanner, iterating the scanner
|
boolean |
next(List<KeyValue> outResult)
Grab the next row's worth of values.
|
boolean |
next(List<KeyValue> outResult,
int limit)
Get the next row of values from this Store.
|
boolean |
next(List<KeyValue> outResult,
int limit,
String metric)
Get the next row of values from this Store.
|
boolean |
next(List<KeyValue> outResult,
String metric)
Grab the next row's worth of values.
|
KeyValue |
peek()
Look at the next KeyValue in this scanner, but do not iterate scanner.
|
boolean |
reseek(KeyValue kv)
Reseek the scanner at or after the specified KeyValue.
|
boolean |
seek(KeyValue key)
Seek the scanner at or after the specified KeyValue.
|
void |
updateReaders()
Notify observers.
|
doRealSeek, enforceSeek, isFileScanner, realSeekDone, requestSeek, shouldUseScanner
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enforceSeek, isFileScanner, realSeekDone, requestSeek, shouldUseScanner
public StoreScanner(Store store, Store.ScanInfo scanInfo, Scan scan, NavigableSet<byte[]> columns) throws IOException
store
- who we scanscan
- the speccolumns
- which columns we are scanningIOException
public StoreScanner(Store store, Store.ScanInfo scanInfo, Scan scan, List<? extends KeyValueScanner> scanners, ScanType scanType, long smallestReadPoint, long earliestPutTs) throws IOException
Opens a scanner across specified StoreFiles.
store
- who we scanscan
- the specscanners
- ancillary scannerssmallestReadPoint
- the readPoint that we should use for tracking
versionsIOException
public KeyValue peek()
KeyValueScanner
peek
in interface KeyValueScanner
public KeyValue next()
KeyValueScanner
next
in interface KeyValueScanner
public void close()
KeyValueScanner
close
in interface Closeable
close
in interface AutoCloseable
close
in interface InternalScanner
close
in interface KeyValueScanner
public boolean seek(KeyValue key) throws IOException
KeyValueScanner
seek
in interface KeyValueScanner
key
- seek valueIOException
public boolean next(List<KeyValue> outResult, int limit) throws IOException
next
in interface InternalScanner
outResult
- limit
- IOException
- epublic boolean next(List<KeyValue> outResult, int limit, String metric) throws IOException
next
in interface InternalScanner
outResult
- limit
- metric
- the metric nameIOException
- epublic boolean next(List<KeyValue> outResult) throws IOException
InternalScanner
next
in interface InternalScanner
outResult
- return output arrayIOException
- epublic boolean next(List<KeyValue> outResult, String metric) throws IOException
InternalScanner
next
in interface InternalScanner
outResult
- return output arraymetric
- the metric nameIOException
- epublic void updateReaders() throws IOException
ChangedReadersObserver
updateReaders
in interface ChangedReadersObserver
IOException
- epublic boolean reseek(KeyValue kv) throws IOException
KeyValueScanner
reseek
in interface KeyValueScanner
kv
- seek value (should be non-null)IOException
public long getSequenceID()
KeyValueScanner
getSequenceID
in interface KeyValueScanner
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.