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>
,java.lang.AutoCloseable
,java.util.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
Constructors Constructor Description UnfilteredRowIteratorWithLowerBound(DecoratedKey partitionKey, SSTableReader sstable, ClusteringIndexFilter filter, ColumnFilter selectedColumns, SSTableReadsListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RegularAndStaticColumns
columns()
A subset of the columns for the (static and regular) rows returned by this iterator.protected Unfiltered
computeNext()
protected UnfilteredRowIterator
initializeIterator()
boolean
isReverseOrder()
Whether or not the rows returned by this iterator are in reversed clustering order.Unfiltered
lowerBound()
TableMetadata
metadata()
The metadata for the table this iterator on.DeletionTime
partitionLevelDeletion()
The partition level deletion for the partition this iterate over.Row
staticRow()
The static part corresponding to this partition (this can be an empty row but cannot benull
).EncodingStats
stats()
Return "statistics" about what is returned by this iterator.-
Methods inherited from class org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator
close, initialized, maybeInit, partitionKey
-
Methods inherited from class org.apache.cassandra.utils.AbstractIterator
endOfData, hasNext, next, peek, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.db.rows.UnfilteredRowIterator
isEmpty
-
-
-
-
Constructor Detail
-
UnfilteredRowIteratorWithLowerBound
public UnfilteredRowIteratorWithLowerBound(DecoratedKey partitionKey, SSTableReader sstable, ClusteringIndexFilter filter, ColumnFilter selectedColumns, SSTableReadsListener listener)
-
-
Method Detail
-
lowerBound
public Unfiltered lowerBound()
- Specified by:
lowerBound
in interfaceIteratorWithLowerBound<Unfiltered>
-
initializeIterator
protected UnfilteredRowIterator initializeIterator()
- Specified by:
initializeIterator
in classLazilyInitializedUnfilteredRowIterator
-
computeNext
protected Unfiltered computeNext()
- Overrides:
computeNext
in classLazilyInitializedUnfilteredRowIterator
-
metadata
public TableMetadata metadata()
Description copied from interface:BaseRowIterator
The metadata for the table this iterator on.- Specified by:
metadata
in interfaceBaseRowIterator<Unfiltered>
- Overrides:
metadata
in classLazilyInitializedUnfilteredRowIterator
-
isReverseOrder
public boolean isReverseOrder()
Description copied from interface:BaseRowIterator
Whether or not the rows returned by this iterator are in reversed clustering order.- Specified by:
isReverseOrder
in interfaceBaseRowIterator<Unfiltered>
- Overrides:
isReverseOrder
in classLazilyInitializedUnfilteredRowIterator
-
columns
public RegularAndStaticColumns columns()
Description copied from interface:BaseRowIterator
A 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:
columns
in interfaceBaseRowIterator<Unfiltered>
- Overrides:
columns
in classLazilyInitializedUnfilteredRowIterator
-
stats
public EncodingStats stats()
Description copied from interface:UnfilteredRowIterator
Return "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:
stats
in interfaceUnfilteredRowIterator
- Overrides:
stats
in classLazilyInitializedUnfilteredRowIterator
-
partitionLevelDeletion
public DeletionTime partitionLevelDeletion()
Description copied from interface:UnfilteredRowIterator
The partition level deletion for the partition this iterate over.- Specified by:
partitionLevelDeletion
in interfaceUnfilteredRowIterator
- Overrides:
partitionLevelDeletion
in classLazilyInitializedUnfilteredRowIterator
-
staticRow
public Row staticRow()
Description copied from interface:BaseRowIterator
The static part corresponding to this partition (this can be an empty row but cannot benull
).- Specified by:
staticRow
in interfaceBaseRowIterator<Unfiltered>
- Overrides:
staticRow
in classLazilyInitializedUnfilteredRowIterator
-
-