Class 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 Detail

      • tablespace

        protected final Tablespace tablespace
      • columnWriters

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

      • HistogramWriter

        public HistogramWriter​(RdbTable table)
    • Method Detail

      • 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 -