Package org.apache.hadoop.hbase.util
Class CollectionBackedScanner
java.lang.Object
org.apache.hadoop.hbase.regionserver.NonLazyKeyValueScanner
org.apache.hadoop.hbase.regionserver.NonReversedNonLazyKeyValueScanner
org.apache.hadoop.hbase.util.CollectionBackedScanner
- All Implemented Interfaces:
Closeable
,AutoCloseable
,KeyValueScanner
,Shipper
Utility scanner that wraps a sortable collection and serves as a KeyValueScanner.
-
Field Summary
Modifier and TypeFieldDescription(package private) final CellComparator
private ExtendedCell
private final Iterable<ExtendedCell>
private Iterator<ExtendedCell>
Fields inherited from interface org.apache.hadoop.hbase.regionserver.KeyValueScanner
NO_NEXT_INDEXED_KEY
-
Constructor Summary
ConstructorDescriptionCollectionBackedScanner
(List<ExtendedCell> list, CellComparator comparator) CollectionBackedScanner
(SortedSet<ExtendedCell> set, CellComparator comparator) CollectionBackedScanner
(CellComparator comparator, ExtendedCell... array) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the KeyValue scanner.private void
init()
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.regionserver.KeyValueScanner
getScannerOrder
-
Field Details
-
data
-
comparator
-
iter
-
current
-
-
Constructor Details
-
CollectionBackedScanner
-
CollectionBackedScanner
-
CollectionBackedScanner
-
CollectionBackedScanner
-
CollectionBackedScanner
-
-
Method Details
-
init
-
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
-
close
Description copied from interface:KeyValueScanner
Close the KeyValue scanner.
-