Package org.apache.cassandra.db.rows
Class UnfilteredRowIteratorWithLowerBound
java.lang.Object
org.apache.cassandra.utils.AbstractIterator<Unfiltered>
org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator
org.apache.cassandra.db.rows.UnfilteredRowIteratorWithLowerBound
- All Implemented Interfaces:
com.google.common.collect.PeekingIterator<Unfiltered>,AutoCloseable,Iterator<Unfiltered>,BaseRowIterator<Unfiltered>,UnfilteredRowIterator,CloseableIterator<Unfiltered>,IteratorWithLowerBound<Unfiltered>
public class UnfilteredRowIteratorWithLowerBound
extends LazilyInitializedUnfilteredRowIterator
implements IteratorWithLowerBound<Unfiltered>
An unfiltered row iterator with a lower bound retrieved from either the global
sstable statistics or the row index lower bounds (if available in the cache).
Before initializing the sstable unfiltered row iterator, we return an empty row
with the clustering set to the lower bound. The empty row will be filtered out and
the result is that if we don't need to access this sstable, i.e. due to the LIMIT conditon,
then we will not. See CASSANDRA-8180 for examples of why this is useful.
-
Constructor Summary
ConstructorsConstructorDescriptionUnfilteredRowIteratorWithLowerBound(DecoratedKey partitionKey, SSTableReader sstable, ClusteringIndexFilter filter, ColumnFilter selectedColumns, SSTableReadsListener listener) UnfilteredRowIteratorWithLowerBound(DecoratedKey partitionKey, SSTableReader sstable, Slices slices, boolean isReverseOrder, ColumnFilter selectedColumns, SSTableReadsListener listener) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertBoundSize(ClusteringPrefix<?> lowerBound, SSTable sstable) columns()A subset of the columns for the (static and regular) rows returned by this iterator.protected Unfilteredprotected UnfilteredRowIteratorbooleanWhether or not the rows returned by this iterator are in reversed clustering order.metadata()The metadata for the table this iterator on.The partition level deletion for the partition this iterate over.The static part corresponding to this partition (this can be an empty row but cannot benull).stats()Return "statistics" about what is returned by this iterator.Methods inherited from class org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator
close, isOpen, maybeInit, partitionKeyMethods inherited from class org.apache.cassandra.utils.AbstractIterator
endOfData, hasNext, next, peek, removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, hasNextMethods inherited from interface org.apache.cassandra.db.rows.UnfilteredRowIterator
isEmpty
-
Constructor Details
-
UnfilteredRowIteratorWithLowerBound
public UnfilteredRowIteratorWithLowerBound(DecoratedKey partitionKey, SSTableReader sstable, ClusteringIndexFilter filter, ColumnFilter selectedColumns, SSTableReadsListener listener) -
UnfilteredRowIteratorWithLowerBound
public UnfilteredRowIteratorWithLowerBound(DecoratedKey partitionKey, SSTableReader sstable, Slices slices, boolean isReverseOrder, ColumnFilter selectedColumns, SSTableReadsListener listener)
-
-
Method Details
-
lowerBound
- Specified by:
lowerBoundin interfaceIteratorWithLowerBound<Unfiltered>
-
initializeIterator
- Specified by:
initializeIteratorin classLazilyInitializedUnfilteredRowIterator
-
computeNext
- Overrides:
computeNextin classLazilyInitializedUnfilteredRowIterator
-
metadata
Description copied from interface:BaseRowIteratorThe metadata for the table this iterator on.- Specified by:
metadatain interfaceBaseRowIterator<Unfiltered>- Overrides:
metadatain classLazilyInitializedUnfilteredRowIterator
-
isReverseOrder
public boolean isReverseOrder()Description copied from interface:BaseRowIteratorWhether or not the rows returned by this iterator are in reversed clustering order.- Specified by:
isReverseOrderin interfaceBaseRowIterator<Unfiltered>- Overrides:
isReverseOrderin classLazilyInitializedUnfilteredRowIterator
-
columns
Description copied from interface:BaseRowIteratorA subset of the columns for the (static and regular) rows returned by this iterator. Every row returned by this iterator must guarantee that it has only those columns.- Specified by:
columnsin interfaceBaseRowIterator<Unfiltered>- Overrides:
columnsin classLazilyInitializedUnfilteredRowIterator
-
stats
Description copied from interface:UnfilteredRowIteratorReturn "statistics" about what is returned by this iterator. Those are used for performance reasons (for delta-encoding for instance) and code should not expect those to be exact.- Specified by:
statsin interfaceUnfilteredRowIterator- Overrides:
statsin classLazilyInitializedUnfilteredRowIterator
-
partitionLevelDeletion
Description copied from interface:UnfilteredRowIteratorThe partition level deletion for the partition this iterate over.- Specified by:
partitionLevelDeletionin interfaceUnfilteredRowIterator- Overrides:
partitionLevelDeletionin classLazilyInitializedUnfilteredRowIterator
-
staticRow
Description copied from interface:BaseRowIteratorThe static part corresponding to this partition (this can be an empty row but cannot benull).- Specified by:
staticRowin interfaceBaseRowIterator<Unfiltered>- Overrides:
staticRowin classLazilyInitializedUnfilteredRowIterator
-
assertBoundSize
-