Class PerSSTableIndexWriter
- java.lang.Object
-
- org.apache.cassandra.index.sasi.disk.PerSSTableIndexWriter
-
- All Implemented Interfaces:
SSTableFlushObserver
public class PerSSTableIndexWriter extends java.lang.Object implements SSTableFlushObserver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
PerSSTableIndexWriter.Index
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<ColumnMetadata,PerSSTableIndexWriter.Index>
indexes
-
Constructor Summary
Constructors Constructor Description PerSSTableIndexWriter(AbstractType<?> keyValidator, Descriptor descriptor, OperationType source, java.util.Map<ColumnMetadata,ColumnIndex> supportedIndexes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
begin()
Called before writing any data to the sstable.void
complete()
Called when all data is written to the file and it's ready to be finished up.boolean
equals(java.lang.Object o)
Descriptor
getDescriptor()
PerSSTableIndexWriter.Index
getIndex(ColumnMetadata columnDef)
int
hashCode()
protected long
maxMemorySize(ColumnIndex columnIndex)
protected PerSSTableIndexWriter.Index
newIndex(ColumnIndex columnIndex)
void
nextUnfilteredCluster(Unfiltered unfiltered)
Called after the unfiltered cluster is written to the sstable.void
startPartition(DecoratedKey key, long curPosition)
Called when a new partition in being written to the sstable, but before any cells are processed (seeSSTableFlushObserver.nextUnfilteredCluster(Unfiltered)
).
-
-
-
Field Detail
-
indexes
protected final java.util.Map<ColumnMetadata,PerSSTableIndexWriter.Index> indexes
-
-
Constructor Detail
-
PerSSTableIndexWriter
public PerSSTableIndexWriter(AbstractType<?> keyValidator, Descriptor descriptor, OperationType source, java.util.Map<ColumnMetadata,ColumnIndex> supportedIndexes)
-
-
Method Detail
-
begin
public void begin()
Description copied from interface:SSTableFlushObserver
Called before writing any data to the sstable.- Specified by:
begin
in interfaceSSTableFlushObserver
-
startPartition
public void startPartition(DecoratedKey key, long curPosition)
Description copied from interface:SSTableFlushObserver
Called when a new partition in being written to the sstable, but before any cells are processed (seeSSTableFlushObserver.nextUnfilteredCluster(Unfiltered)
).- Specified by:
startPartition
in interfaceSSTableFlushObserver
- Parameters:
key
- The key being appended to SSTable.curPosition
- The position of the key in the SSTable PRIMARY_INDEX file.
-
nextUnfilteredCluster
public void nextUnfilteredCluster(Unfiltered unfiltered)
Description copied from interface:SSTableFlushObserver
Called after the unfiltered cluster is written to the sstable. Will be preceded by a call tostartPartition(DecoratedKey, long)
, and the cluster should be assumed to belong to that partition.- Specified by:
nextUnfilteredCluster
in interfaceSSTableFlushObserver
- Parameters:
unfiltered
- The unfiltered cluster being added to SSTable.
-
complete
public void complete()
Description copied from interface:SSTableFlushObserver
Called when all data is written to the file and it's ready to be finished up.- Specified by:
complete
in interfaceSSTableFlushObserver
-
getIndex
public PerSSTableIndexWriter.Index getIndex(ColumnMetadata columnDef)
-
getDescriptor
public Descriptor getDescriptor()
-
newIndex
protected PerSSTableIndexWriter.Index newIndex(ColumnIndex columnIndex)
-
maxMemorySize
protected long maxMemorySize(ColumnIndex columnIndex)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-