Class HistogramWriter

java.lang.Object
org.yamcs.yarch.rocksdb.HistogramWriter
Direct Known Subclasses:
SingleColumnHistogramWriter

public abstract class HistogramWriter extends Object
Writes histograms for one table.

There is one of these objects for each table used by the table writers.

The HistogramRebuilder will use another writer during build

It does allow concurrent access

  • Field Details

    • tablespace

      protected final Tablespace tablespace
    • tableDefinition

      protected final TableDefinition tableDefinition
    • table

      protected final RdbTable table
    • columnWriters

      protected final List<org.yamcs.yarch.rocksdb.HistogramWriter.ColumnHistogramWriter> columnWriters
  • Constructor Details

    • HistogramWriter

      public HistogramWriter(RdbTable table)
  • Method Details

    • addHistogram

      public abstract void addHistogram(Row sertuple) throws IOException, org.rocksdb.RocksDBException
      Throws:
      IOException
      org.rocksdb.RocksDBException
    • startQueueing

      public abstract CompletableFuture<org.rocksdb.Snapshot> startQueueing(String dir) throws IOException
      called from the histogram rebuilder to start queueing all new data while the builder rebuilds a (part) of the.

      Returns a snapshot of the database for the given partition at the time of the call.

      The caller is responsible for releasing the snapshot histograms

      Parameters:
      dir -
      Throws:
      IOException
    • stopQueueing

      public abstract void stopQueueing(String partitionDir)
      called from the histogram rebuilder to stop queuing and start again updating histograms starting with the ones queued
      Parameters:
      partitionDir -
    • newWriter

      public static HistogramWriter newWriter(RdbTable table)