Package org.apache.cassandra.io.sstable
Class AbstractSSTableIterator<RIE extends AbstractRowIndexEntry>
java.lang.Object
org.apache.cassandra.io.sstable.AbstractSSTableIterator<RIE>
- All Implemented Interfaces:
AutoCloseable,Iterator<Unfiltered>,BaseRowIterator<Unfiltered>,UnfilteredRowIterator,CloseableIterator<Unfiltered>
- Direct Known Subclasses:
SSTableIterator,SSTableReversedIterator
public abstract class AbstractSSTableIterator<RIE extends AbstractRowIndexEntry>
extends Object
implements UnfilteredRowIterator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassprotected classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ColumnFilterprotected final DeserializationHelperprotected final FileHandleprotected final DecoratedKeyprotected final TableMetadataprotected final DeletionTimeprotected final AbstractSSTableIterator.Readerprotected final Slicesprotected final SSTableReaderprotected final Row -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSSTableIterator(SSTableReader sstable, FileDataInput file, DecoratedKey key, RIE indexEntry, Slices slices, ColumnFilter columnFilter, FileHandle ifile) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()columns()A subset of the columns for the (static and regular) rows returned by this iterator.protected abstract AbstractSSTableIterator.ReadercreateReaderInternal(RIE indexEntry, FileDataInput file, boolean shouldCloseFile, Version version) protected abstract booleanChecks if there are more slice to process.booleanhasNext()metadata()The metadata for the table this iterator on.next()protected abstract intReturns the index of the next slice to process.The partition key of the partition this in an iterator over.The partition level deletion for the partition this iterate over.voidremove()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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.db.rows.BaseRowIterator
isReverseOrderMethods inherited from interface java.util.Iterator
forEachRemainingMethods inherited from interface org.apache.cassandra.db.rows.UnfilteredRowIterator
isEmpty
-
Field Details
-
sstable
-
metadata
-
key
-
partitionLevelDeletion
-
columns
-
helper
-
staticRow
-
reader
-
ifile
-
slices
-
-
Constructor Details
-
AbstractSSTableIterator
protected AbstractSSTableIterator(SSTableReader sstable, FileDataInput file, DecoratedKey key, RIE indexEntry, Slices slices, ColumnFilter columnFilter, FileHandle ifile)
-
-
Method Details
-
nextSliceIndex
protected abstract int nextSliceIndex()Returns the index of the next slice to process.- Returns:
- the index of the next slice to process
-
hasMoreSlices
protected abstract boolean hasMoreSlices()Checks if there are more slice to process.- Returns:
trueif there are more slice to process,falseotherwise.
-
createReaderInternal
protected abstract AbstractSSTableIterator.Reader createReaderInternal(RIE indexEntry, FileDataInput file, boolean shouldCloseFile, Version version) -
metadata
Description copied from interface:BaseRowIteratorThe metadata for the table this iterator on.- Specified by:
metadatain interfaceBaseRowIterator<RIE extends AbstractRowIndexEntry>
-
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<RIE extends AbstractRowIndexEntry>
-
partitionKey
Description copied from interface:BaseRowIteratorThe partition key of the partition this in an iterator over.- Specified by:
partitionKeyin interfaceBaseRowIterator<RIE extends AbstractRowIndexEntry>
-
partitionLevelDeletion
Description copied from interface:UnfilteredRowIteratorThe partition level deletion for the partition this iterate over.- Specified by:
partitionLevelDeletionin interfaceUnfilteredRowIterator
-
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<RIE extends AbstractRowIndexEntry>
-
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
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<RIE extends AbstractRowIndexEntry>
-
next
- Specified by:
nextin interfaceIterator<RIE extends AbstractRowIndexEntry>
-
remove
public void remove()- Specified by:
removein interfaceIterator<RIE extends AbstractRowIndexEntry>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableIterator<RIE extends AbstractRowIndexEntry>
-