Package org.yamcs.yarch.rocksdb
Class RdbTableWriter
java.lang.Object
org.yamcs.yarch.TableWriter
org.yamcs.yarch.rocksdb.RdbTableWriter
- All Implemented Interfaces:
StreamSubscriber
table writer for the rocksdb2 engine.
See Tablespace
for a description of the data format.
There might be multiple objects of this class writing in the same table. We perform locking at record level using the
YRDB.lock(byte[])
function.
The histograms are written by the HistogramWriter
.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.yamcs.yarch.TableWriter
TableWriter.InsertMode
-
Field Summary
Fields inherited from class org.yamcs.yarch.TableWriter
mode, ydb
-
Constructor Summary
ConstructorDescriptionRdbTableWriter
(YarchDatabaseInstance ydb, RdbTable table, TableWriter.InsertMode mode) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doClose()
get the filename where the tuple would fit (can be a partition)void
void
streamClosed
(Stream stream) Methods inherited from class org.yamcs.yarch.TableWriter
close, closeFuture
-
Constructor Details
-
RdbTableWriter
-
-
Method Details
-
onTuple
-
getDbPartition
get the filename where the tuple would fit (can be a partition)- Parameters:
t
-- Returns:
- the partition where the tuple fits
- Throws:
IOException
- if there was an error while creating the directories where the file should be located
-
doClose
protected void doClose()- Specified by:
doClose
in classTableWriter
-
streamClosed
-