Interface PerColumnIndexWriter
- All Known Implementing Classes:
MemtableIndexWriter,SSTableIndexWriter
public interface PerColumnIndexWriter
Creates the on-disk components for a given column index.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAborts accumulating data.voidaddRow(PrimaryKey key, Row row, long sstableRowId) Adds a row to this index.voidcomplete(com.google.common.base.Stopwatch stopwatch) Builds on-disk index data structures from accumulated data, moves them all to the filesystem, and fsync created files.voidonSSTableWriterSwitched(com.google.common.base.Stopwatch stopwatch) Called when current SSTable writer is switched during sharded compaction to free any in-memory resources associated with the SSTable for current index without waiting for full transaction to complete
-
Method Details
-
addRow
Adds a row to this index.Note: Callers are responsible for ensuring that rows are added in
PrimaryKeyorder.- Throws:
IOException
-
complete
Builds on-disk index data structures from accumulated data, moves them all to the filesystem, and fsync created files.- Throws:
IOException
-
onSSTableWriterSwitched
Called when current SSTable writer is switched during sharded compaction to free any in-memory resources associated with the SSTable for current index without waiting for full transaction to complete- Throws:
IOException
-
abort
Aborts accumulating data. Allows to clean up resources on error.Note: Implementations should be idempotent, i.e. safe to call multiple times without producing undesirable side-effects.
-