Package org.yamcs.yarch.rocksdb
Class RdbTableReaderStream
- java.lang.Object
-
- org.yamcs.yarch.Stream
-
- org.yamcs.yarch.AbstractTableReaderStream
-
- org.yamcs.yarch.rocksdb.RdbTableReaderStream
-
- All Implemented Interfaces:
Runnable
,DbReaderStream
public class RdbTableReaderStream extends AbstractTableReaderStream implements Runnable, DbReaderStream
reader for tables with PartitionStorage.IN_KEY (the partition is prepended in front of the key)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.yamcs.yarch.Stream
Stream.ExceptionHandler
-
-
Field Summary
-
Fields inherited from class org.yamcs.yarch.AbstractTableReaderStream
ascending, follow, partitionManager, tableDefinition
-
Fields inherited from class org.yamcs.yarch.Stream
log, name, outputDefinition, QUITTING, RUNNING, SETUP, state, subscribers, ydb
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RdbTableReaderStream(Tablespace tablespace, YarchDatabaseInstance ydb, PartitionManager pmgr, boolean ascending, boolean follow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitClosure(int millisec)
void
doStart()
Start emitting tuples.long
getNumRecordsRead()
protected boolean
runPartitions(List<Partition> partitions, IndexFilter range)
reads a file, sending data only that conform with the start and end filters.-
Methods inherited from class org.yamcs.yarch.AbstractTableReaderStream
addInFilter, addRelOpFilter, compare, dataToTuple, doClose, emitIfNotPastStart, emitIfNotPastStop, getTableDefinition, run
-
Methods inherited from class org.yamcs.yarch.Stream
addSubscriber, close, emitTuple, exceptionHandler, getColumnDefinition, getDataCount, getDefinition, getName, getState, getSubscriberCount, getSubscribers, isRunning, quitting, removeSubscriber, setName, start, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.yamcs.yarch.DbReaderStream
addInFilter, addRelOpFilter
-
-
-
-
Constructor Detail
-
RdbTableReaderStream
protected RdbTableReaderStream(Tablespace tablespace, YarchDatabaseInstance ydb, PartitionManager pmgr, boolean ascending, boolean follow)
-
-
Method Detail
-
doStart
public void doStart()
Description copied from class:Stream
Start emitting tuples.
-
runPartitions
protected boolean runPartitions(List<Partition> partitions, IndexFilter range) throws IOException
reads a file, sending data only that conform with the start and end filters. returns true if the stop condition is met All the partitions are from the same time interval and thus from one single RocksDB database- Specified by:
runPartitions
in classAbstractTableReaderStream
- Returns:
- returns true if the end condition has been reached.
- Throws:
IOException
-
getNumRecordsRead
public long getNumRecordsRead()
-
awaitClosure
public boolean awaitClosure(int millisec) throws InterruptedException
- Throws:
InterruptedException
-
-