Package org.yamcs.yarch.rocksdb
Class RdbPartitionManager
- java.lang.Object
-
- org.yamcs.yarch.PartitionManager
-
- org.yamcs.yarch.rocksdb.RdbPartitionManager
-
public class RdbPartitionManager extends PartitionManager
Handles partitions for one table. All partitions are stored as records in the tablespace.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.yamcs.yarch.PartitionManager
PartitionManager.Interval
-
-
Field Summary
-
Fields inherited from class org.yamcs.yarch.PartitionManager
intervals, partitioningSpec, pcache, tableDefinition
-
-
Constructor Summary
Constructors Constructor Description RdbPartitionManager(RdbTable table, String yamcsInstance, TableDefinition tableDefinition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected HistogramInfo
createHistogram(String columnName)
For non time partitioned tables - create a tablespace record for the histogram for the given column nameprotected HistogramInfo
createHistogramByTime(TimePartitionInfo pinfo, String columnName)
For time partitioned tables: creates a tablespace record for the histogram for the given column nameprotected Partition
createPartition(Object value)
Create a partition for value based partitioningprotected Partition
createPartitionByTime(TimePartitionInfo pinfo, Object value)
Create a partition for time (and possible value) based partitioningvoid
readPartitions()
Called at startup to read existing partitions-
Methods inherited from class org.yamcs.yarch.PartitionManager
createAndGetHistogram, createAndGetPartition, getPartitionForTuple, getPartitioningSpec, getPartitions, getTableDefinition, getTableName, intervalIterator, iterator, iterator, reverseIterator, reverseIterator
-
-
-
-
Constructor Detail
-
RdbPartitionManager
public RdbPartitionManager(RdbTable table, String yamcsInstance, TableDefinition tableDefinition)
-
-
Method Detail
-
readPartitions
public void readPartitions() throws org.rocksdb.RocksDBException, IOException
Called at startup to read existing partitions- Throws:
IOException
org.rocksdb.RocksDBException
-
createPartitionByTime
protected Partition createPartitionByTime(TimePartitionInfo pinfo, Object value) throws IOException
Description copied from class:PartitionManager
Create a partition for time (and possible value) based partitioning- Specified by:
createPartitionByTime
in classPartitionManager
- Returns:
- Throws:
IOException
-
createPartition
protected Partition createPartition(Object value)
Description copied from class:PartitionManager
Create a partition for value based partitioning- Specified by:
createPartition
in classPartitionManager
- Returns:
-
createHistogramByTime
protected HistogramInfo createHistogramByTime(TimePartitionInfo pinfo, String columnName)
For time partitioned tables: creates a tablespace record for the histogram for the given column name- Specified by:
createHistogramByTime
in classPartitionManager
-
createHistogram
protected HistogramInfo createHistogram(String columnName)
For non time partitioned tables - create a tablespace record for the histogram for the given column name- Specified by:
createHistogram
in classPartitionManager
-
-