Class SnapshotSegmentScanner
java.lang.Object
org.apache.hadoop.hbase.regionserver.NonLazyKeyValueScanner
org.apache.hadoop.hbase.regionserver.NonReversedNonLazyKeyValueScanner
org.apache.hadoop.hbase.regionserver.SnapshotSegmentScanner
- All Implemented Interfaces:
Closeable
,AutoCloseable
,KeyValueScanner
,Shipper
A basic SegmentScanner used against an ImmutableScanner snapshot Used flushing where we do a
single pass, no reverse scanning or inserts happening. Its a dumbed-down Scanner that can go
fast. Like
CollectionBackedScanner
(but making it know about
Segments was onerous).-
Field Summary
Modifier and TypeFieldDescriptionprivate ExtendedCell
private Iterator<ExtendedCell>
private final ImmutableSegment
Fields inherited from interface org.apache.hadoop.hbase.regionserver.KeyValueScanner
NO_NEXT_INDEXED_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the KeyValue scanner.private static Iterator<ExtendedCell>
createIterator
(Segment segment) long
Get the order of this KeyValueScanner.next()
Return the next Cell in this scanner, iterating the scannerpeek()
Look at the next Cell in this scanner, but do not iterate scanner.boolean
reseek
(ExtendedCell seekCell) Reseek the scanner at or after the specified KeyValue.boolean
seek
(ExtendedCell seekCell) Seek the scanner at or after the specified KeyValue.Methods inherited from class org.apache.hadoop.hbase.regionserver.NonReversedNonLazyKeyValueScanner
backwardSeek, seekToLastRow, seekToPreviousRow
Methods inherited from class org.apache.hadoop.hbase.regionserver.NonLazyKeyValueScanner
doRealSeek, enforceSeek, getFilePath, getNextIndexedKey, isFileScanner, realSeekDone, recordBlockSize, requestSeek, shipped, shouldUseScanner
-
Field Details
-
segment
-
iter
-
current
-
-
Constructor Details
-
SnapshotSegmentScanner
-
-
Method Details
-
createIterator
-
peek
Description copied from interface:KeyValueScanner
Look at the next Cell in this scanner, but do not iterate scanner. NOTICE: The returned cell has not been passed into ScanQueryMatcher. So it may not be what the user need.- Returns:
- the next Cell
-
next
Description copied from interface:KeyValueScanner
Return the next Cell in this scanner, iterating the scanner- Returns:
- the next Cell
-
seek
Description copied from interface:KeyValueScanner
Seek the scanner at or after the specified KeyValue.- Parameters:
seekCell
- seek value- Returns:
- true if scanner has values left, false if end of scanner
-
reseek
Description copied from interface:KeyValueScanner
Reseek the scanner at or after the specified KeyValue. This method is guaranteed to seek at or after 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.- Parameters:
seekCell
- seek value (should be non-null)- Returns:
- true if scanner has values left, false if end of scanner
-
getScannerOrder
Description copied from interface:KeyValueScanner
Get the order of this KeyValueScanner. This is only relevant for StoreFileScanners. This is required for comparing multiple files to find out which one has the latest data. StoreFileScanners are ordered from 0 (oldest) to newest in increasing order.- See Also:
-
close
Description copied from interface:KeyValueScanner
Close the KeyValue scanner.
-