Package org.yamcs.yarch.rocksdb
Class HistogramWriter
java.lang.Object
org.yamcs.yarch.rocksdb.HistogramWriter
- Direct Known Subclasses:
SingleColumnHistogramWriter
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 Summary
Modifier and TypeFieldDescriptionprotected final List<org.yamcs.yarch.rocksdb.HistogramWriter.ColumnHistogramWriter>
protected final RdbTable
protected final TableDefinition
protected final Tablespace
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
addHistogram
(Row sertuple) static HistogramWriter
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 Details
-
tablespace
-
tableDefinition
-
table
-
columnWriters
-
-
Constructor Details
-
HistogramWriter
-
-
Method Details
-
addHistogram
- 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
called from the histogram rebuilder to stop queuing and start again updating histograms starting with the ones queued- Parameters:
partitionDir
-
-
newWriter
-