Package org.yamcs.yarch.rocksdb
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 buildIt does allow concurrent access
-
-
Field Summary
Fields Modifier and Type Field Description protected List<org.yamcs.yarch.rocksdb.HistogramWriter.ColumnHistogramWriter>
columnWriters
protected RdbTable
table
protected TableDefinition
tableDefinition
protected Tablespace
tablespace
-
Constructor Summary
Constructors Constructor Description HistogramWriter(RdbTable table)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addHistogram(Row sertuple)
static HistogramWriter
newWriter(RdbTable table)
abstract CompletableFuture<org.rocksdb.Snapshot>
startQueueing(String dir)
called from the histogram rebuilder to start queueing all new data while the builder rebuilds a (part) of the.abstract void
stopQueueing(String partitionDir)
called from the histogram rebuilder to stop queuing and start again updating histograms starting with the ones queued
-
-
-
Field Detail
-
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 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
-
-
newWriter
public static HistogramWriter newWriter(RdbTable table)
-
-