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 RegularAndStaticColumnscolumns()A subset of the columns for the (static and regular) rows returned by this iterator.protected UnfilteredcomputeNext()protected UnfilteredRowIteratorinitializeIterator()booleanisReverseOrder()Whether or not the rows returned by this iterator are in reversed clustering order.UnfilteredlowerBound()TableMetadatametadata()The metadata for the table this iterator on.DeletionTimepartitionLevelDeletion()The partition level deletion for the partition this iterate over.RowstaticRow()The static part corresponding to this partition (this can be an empty row but cannot benull).EncodingStatsstats()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:
lowerBoundin interfaceIteratorWithLowerBound<Unfiltered>
-
initializeIterator
protected UnfilteredRowIterator initializeIterator()
- Specified by:
initializeIteratorin classLazilyInitializedUnfilteredRowIterator
-
computeNext
protected Unfiltered computeNext()
- Overrides:
computeNextin classLazilyInitializedUnfilteredRowIterator
-
metadata
public TableMetadata 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
public RegularAndStaticColumns 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
public EncodingStats 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
public DeletionTime partitionLevelDeletion()
Description copied from interface:UnfilteredRowIteratorThe partition level deletion for the partition this iterate over.- Specified by:
partitionLevelDeletionin interfaceUnfilteredRowIterator- Overrides:
partitionLevelDeletionin classLazilyInitializedUnfilteredRowIterator
-
staticRow
public Row 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
-
-