Package org.yamcs.yarch.rocksdb
Class RdbTableWriter
- java.lang.Object
-
- org.yamcs.yarch.TableWriter
-
- org.yamcs.yarch.rocksdb.RdbTableWriter
-
- All Implemented Interfaces:
StreamSubscriber
public class RdbTableWriter extends TableWriter
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, table, ydb
-
-
Constructor Summary
Constructors Constructor Description RdbTableWriter(YarchDatabaseInstance ydb, RdbTable table, TableWriter.InsertMode mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doClose()
RdbPartition
getDbPartition(Tuple t)
get the filename where the tuple would fit (can be a partition)void
onTuple(Stream stream, Tuple t)
void
streamClosed(Stream stream)
-
Methods inherited from class org.yamcs.yarch.TableWriter
close, closeFuture
-
-
-
-
Constructor Detail
-
RdbTableWriter
public RdbTableWriter(YarchDatabaseInstance ydb, RdbTable table, TableWriter.InsertMode mode)
-
-
Method Detail
-
getDbPartition
public RdbPartition getDbPartition(Tuple t) throws IOException
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
public void streamClosed(Stream stream)
-
-