@InterfaceAudience.Private public class SegmentScanner extends Object implements KeyValueScanner
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
closed |
protected Cell |
current |
protected Iterator<Cell> |
iter |
protected Segment |
segment |
NO_NEXT_INDEXED_KEY| 限定符 | 构造器和说明 |
|---|---|
protected |
SegmentScanner(Segment segment,
long readPoint)
Scanners are ordered from 0 (oldest) to newest in increasing order.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
backwardSeek(Cell key)
Seek the scanner at or before the row of specified Cell, it firstly
tries to seek the scanner at or after the specified Cell, return if
peek KeyValue of scanner has the same row with specified Cell,
otherwise seek the scanner at the first Cell of the row which is the
previous row of specified KeyValue
|
void |
close()
Close the KeyValue scanner.
|
void |
enforceSeek()
This function should be never called on scanners that always do real seek operations (i.e. most
of the scanners and also this one).
|
org.apache.hadoop.fs.Path |
getFilePath() |
protected Iterator<Cell> |
getIterator(Cell cell) |
Cell |
getNextIndexedKey() |
boolean |
isFileScanner() |
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 the scanner
|
boolean |
realSeekDone()
This scanner is working solely on the in-memory MemStore and doesn't work on
store files, MutableCellSetSegmentScanner always does the seek,
therefore always returning true.
|
boolean |
requestSeek(Cell c,
boolean forward,
boolean useBloom)
Similar to
KeyValueScanner.seek(org.apache.hadoop.hbase.Cell) (or KeyValueScanner.reseek(org.apache.hadoop.hbase.Cell) if forward is true) but only
does a seek operation after checking that it is really necessary for the
row/column combination specified by the kv parameter. |
boolean |
reseek(Cell cell)
Reseek the scanner at or after the specified KeyValue.
|
boolean |
seek(Cell cell)
Seek the scanner at or after the specified Cell.
|
boolean |
seekToLastRow()
Seek the scanner at the first KeyValue of last row
|
boolean |
seekToPreviousRow(Cell cell)
Seek the scanner at the first Cell of the row which is the previous row
of specified key
|
void |
shipped()
Called after a batch of rows scanned (RPC) and set to be returned to client.
|
boolean |
shouldUseScanner(Scan scan,
HStore store,
long oldestUnexpiredTS)
This functionality should be resolved in the higher level which is
MemStoreScanner, currently returns true as default.
|
String |
toString() |
protected void |
updateCurrent()
Private internal method for iterating over the segment,
skipping the cells with irrelevant MVCC
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetScannerOrderprotected final Segment segment
protected Cell current
protected boolean closed
protected SegmentScanner(Segment segment, long readPoint)
public Cell peek()
peek 在接口中 KeyValueScannerpublic Cell next() throws IOException
next 在接口中 KeyValueScannerIOExceptionpublic boolean seek(Cell cell) throws IOException
seek 在接口中 KeyValueScannercell - seek valueIOExceptionpublic boolean reseek(Cell cell) throws IOException
reseek 在接口中 KeyValueScannercell - seek value (should be non-null)IOExceptionpublic boolean backwardSeek(Cell key) throws IOException
backwardSeek 在接口中 KeyValueScannerkey - seek CellIOExceptionpublic boolean seekToPreviousRow(Cell cell) throws IOException
seekToPreviousRow 在接口中 KeyValueScannercell - seek valueIOExceptionpublic boolean seekToLastRow()
throws IOException
seekToLastRow 在接口中 KeyValueScannerIOExceptionpublic void close()
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在接口中 KeyValueScannerpublic boolean shouldUseScanner(Scan scan, HStore store, long oldestUnexpiredTS)
shouldUseScanner 在接口中 KeyValueScannerscan - 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 requestSeek(Cell c, boolean forward, boolean useBloom) throws IOException
KeyValueScannerKeyValueScanner.seek(org.apache.hadoop.hbase.Cell) (or KeyValueScanner.reseek(org.apache.hadoop.hbase.Cell) if forward is true) but only
does a seek operation after checking that it is really necessary for the
row/column combination specified by the kv parameter. This function was
added to avoid unnecessary disk seeks by checking row-column Bloom filters
before a seek on multi-column get/scan queries, and to optimize by looking
up more recent files first.requestSeek 在接口中 KeyValueScannerforward - do a forward-only "reseek" instead of a random-access seekuseBloom - whether to enable multi-column Bloom filter optimizationIOExceptionpublic boolean realSeekDone()
realSeekDone 在接口中 KeyValueScannerpublic void enforceSeek()
throws IOException
realSeekDone() first.enforceSeek 在接口中 KeyValueScannerIOExceptionpublic boolean isFileScanner()
isFileScanner 在接口中 KeyValueScannerpublic org.apache.hadoop.fs.Path getFilePath()
getFilePath 在接口中 KeyValueScannerKeyValueScanner.isFileScanner()public Cell getNextIndexedKey()
getNextIndexedKey 在接口中 KeyValueScannerpublic void shipped()
throws IOException
shipped 在接口中 ShipperIOExceptionprotected void updateCurrent()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.