Class MemtableIndexWriter
- java.lang.Object
-
- org.apache.cassandra.index.sai.disk.v1.MemtableIndexWriter
-
- All Implemented Interfaces:
PerColumnIndexWriter
public class MemtableIndexWriter extends java.lang.Object implements PerColumnIndexWriter
Column index writer that flushes indexed data directly from the corresponding Memtable index, without buffering index data in memory.
-
-
Constructor Summary
Constructors Constructor Description MemtableIndexWriter(MemtableIndex memtable, IndexDescriptor indexDescriptor, IndexTermType indexTermType, IndexIdentifier indexIdentifier, IndexMetrics indexMetrics, RowMapping rowMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort(java.lang.Throwable cause)
Aborts accumulating data.void
addRow(PrimaryKey key, Row row, long sstableRowId)
Adds a row to this index.void
complete(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.
-
-
-
Constructor Detail
-
MemtableIndexWriter
public MemtableIndexWriter(MemtableIndex memtable, IndexDescriptor indexDescriptor, IndexTermType indexTermType, IndexIdentifier indexIdentifier, IndexMetrics indexMetrics, RowMapping rowMapping)
-
-
Method Detail
-
addRow
public void addRow(PrimaryKey key, Row row, long sstableRowId)
Description copied from interface:PerColumnIndexWriter
Adds a row to this index.Note: Callers are responsible for ensuring that rows are added in
PrimaryKey
order.- Specified by:
addRow
in interfacePerColumnIndexWriter
-
abort
public void abort(java.lang.Throwable cause)
Description copied from interface:PerColumnIndexWriter
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.
- Specified by:
abort
in interfacePerColumnIndexWriter
-
complete
public void complete(com.google.common.base.Stopwatch stopwatch) throws java.io.IOException
Description copied from interface:PerColumnIndexWriter
Builds on-disk index data structures from accumulated data, moves them all to the filesystem, and fsync created files.- Specified by:
complete
in interfacePerColumnIndexWriter
- Throws:
java.io.IOException
-
-