Class SSTableIndexWriter

  • All Implemented Interfaces:
    PerColumnIndexWriter

    @NotThreadSafe
    public class SSTableIndexWriter
    extends java.lang.Object
    implements PerColumnIndexWriter
    Column index writer that accumulates (on-heap) indexed data from a compacted SSTable as it's being flushed to disk.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addRow

        public void addRow​(PrimaryKey key,
                           Row row,
                           long sstableRowId)
                    throws java.io.IOException
        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 interface PerColumnIndexWriter
        Throws:
        java.io.IOException
      • 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 interface PerColumnIndexWriter
        Throws:
        java.io.IOException
      • 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 interface PerColumnIndexWriter