Class PerSSTableIndexWriter
java.lang.Object
org.apache.cassandra.index.sasi.disk.PerSSTableIndexWriter
- All Implemented Interfaces:
SSTableFlushObserver
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPerSSTableIndexWriter(AbstractType<?> keyValidator, Descriptor descriptor, OperationType source, Map<ColumnMetadata, ColumnIndex> supportedIndexes) -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()Called before writing any data to the sstable.voidcomplete()Called when all data is written to the file and it's ready to be finished up.booleangetIndex(ColumnMetadata columnDef) inthashCode()protected longmaxMemorySize(ColumnIndex columnIndex) protected PerSSTableIndexWriter.IndexnewIndex(ColumnIndex columnIndex) voidnextUnfilteredCluster(Unfiltered unfiltered) Called after an unfiltered is written to the sstable.voidstartPartition(DecoratedKey key, long keyPosition, long KeyPositionForSASI) Called when a new partition in being written to the sstable, but before any cells are processed (seeSSTableFlushObserver.nextUnfilteredCluster(Unfiltered)).voidCalled when a static row is being written to the sstable.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.io.sstable.SSTableFlushObserver
abort, onSSTableWriterSwitched
-
Field Details
-
indexes
-
-
Constructor Details
-
PerSSTableIndexWriter
public PerSSTableIndexWriter(AbstractType<?> keyValidator, Descriptor descriptor, OperationType source, Map<ColumnMetadata, ColumnIndex> supportedIndexes)
-
-
Method Details
-
begin
public void begin()Description copied from interface:SSTableFlushObserverCalled before writing any data to the sstable.- Specified by:
beginin interfaceSSTableFlushObserver
-
startPartition
Description copied from interface:SSTableFlushObserverCalled when a new partition in being written to the sstable, but before any cells are processed (seeSSTableFlushObserver.nextUnfilteredCluster(Unfiltered)).- Specified by:
startPartitionin interfaceSSTableFlushObserver- Parameters:
key- the key being appended to SSTable.keyPosition- the position of the key in the SSTable data fileKeyPositionForSASI- SSTable format specific key position for storage attached indexes, it can be in data file or in some index file. It is the same position as returned byKeyReader.keyPositionForSecondaryIndex()for the same format, and the same position as expected bySSTableReader.keyAtPositionFromSecondaryIndex(long).
-
staticRow
Description copied from interface:SSTableFlushObserverCalled when a static row is being written to the sstable. If static columns are present in the table, it is called afterSSTableFlushObserver.startPartition(DecoratedKey, long, long)and before any calls toSSTableFlushObserver.nextUnfilteredCluster(Unfiltered).- Specified by:
staticRowin interfaceSSTableFlushObserver- Parameters:
staticRow- static row appended to the sstable, can be empty, may not benull
-
nextUnfilteredCluster
Description copied from interface:SSTableFlushObserverCalled after an unfiltered is written to the sstable. Will be preceded by a call toSSTableFlushObserver.startPartition(DecoratedKey, long, long), and the unfiltered should be assumed to belong to that partition.- Specified by:
nextUnfilteredClusterin interfaceSSTableFlushObserver- Parameters:
unfiltered- the unfiltered being written to the SSTable
-
complete
public void complete()Description copied from interface:SSTableFlushObserverCalled when all data is written to the file and it's ready to be finished up.- Specified by:
completein interfaceSSTableFlushObserver
-
getIndex
-
getDescriptor
-
newIndex
-
maxMemorySize
-
hashCode
public int hashCode() -
equals
-