protected class DefaultMemStore.MemStoreScanner extends NonLazyKeyValueScanner
Modifier and Type | Field and Description |
---|---|
(package private) MemStoreLAB |
allocatorAtCreation |
private CellSkipListSet |
cellSetAtCreation |
private Iterator<Cell> |
cellSetIt |
private Cell |
cellSetItRow |
private Cell |
cellSetNextRow |
private long |
readPoint |
(package private) MemStoreLAB |
snapshotAllocatorAtCreation |
private CellSkipListSet |
snapshotAtCreation |
private Iterator<Cell> |
snapshotIt |
private Cell |
snapshotItRow |
private Cell |
snapshotNextRow |
private boolean |
stopSkippingCellsIfNextRow |
private Cell |
stopSkippingKVsRow |
private Cell |
theNext |
NO_NEXT_INDEXED_KEY
Constructor and Description |
---|
DefaultMemStore.MemStoreScanner(long readPoint) |
Modifier and Type | Method and Description |
---|---|
boolean |
backwardSeek(Cell key)
Seek scanner to the given key first.
|
void |
close()
Close the KeyValue scanner.
|
private Cell |
getHighest(Cell first,
Cell second) |
private Cell |
getLowest(Cell first,
Cell second) |
private Cell |
getNext(Iterator<Cell> it)
Lock on 'this' must be held by caller.
|
long |
getSequenceID()
MemStoreScanner returns max value as sequence id because it will
always have the latest data among all files.
|
Cell |
next()
Return the next Cell in this scanner, iterating the scanner
|
Cell |
peek()
Look at the next Cell in this scanner, but do not iterate scanner.
|
boolean |
reseek(Cell key)
Move forward on the sub-lists set previously by seek.
|
boolean |
seek(Cell key)
Set the scanner at the seek key.
|
private boolean |
seekInSubLists(Cell key)
(Re)initialize the iterators after a seek or a reseek.
|
boolean |
seekToLastRow()
Seek the scanner at the first KeyValue of last row
|
boolean |
seekToPreviousRow(Cell originalKey)
Separately get the KeyValue before the specified key from kvset and
snapshotset, and use the row of higher one as the previous row of
specified key, then seek to the first KeyValue of previous row
|
boolean |
shouldUseScanner(Scan scan,
Store store,
long oldestUnexpiredTS)
Allows to filter out scanners (both StoreFile and memstore) that we don't
want to use based on criteria such as Bloom filters and timestamp ranges.
|
doRealSeek, enforceSeek, getNextIndexedKey, isFileScanner, realSeekDone, requestSeek
private Cell cellSetNextRow
private Cell snapshotNextRow
private Cell cellSetItRow
private Cell snapshotItRow
private CellSkipListSet cellSetAtCreation
private CellSkipListSet snapshotAtCreation
private Cell theNext
volatile MemStoreLAB allocatorAtCreation
volatile MemStoreLAB snapshotAllocatorAtCreation
private boolean stopSkippingCellsIfNextRow
private Cell stopSkippingKVsRow
private long readPoint
private Cell getNext(Iterator<Cell> it)
it
- public boolean seek(Cell key)
key
- seek valueprivate boolean seekInSubLists(Cell key)
public boolean reseek(Cell key)
key
- seek value (should be non-null)public Cell peek()
KeyValueScanner
public Cell next()
KeyValueScanner
public void close()
KeyValueScanner
public long getSequenceID()
public boolean shouldUseScanner(Scan scan, Store store, long oldestUnexpiredTS)
KeyValueScanner
shouldUseScanner
in interface KeyValueScanner
shouldUseScanner
in class NonLazyKeyValueScanner
scan
- the scan that we are selecting scanners forstore
- the store we are performing the scan on.oldestUnexpiredTS
- the oldest timestamp we are interested in for
this query, based on TTLpublic boolean backwardSeek(Cell key)
key
- seek KeyValuepublic boolean seekToPreviousRow(Cell originalKey)
originalKey
- seek valuepublic boolean seekToLastRow()
KeyValueScanner
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.