CassandraBaseTimeseriesDao init method fix (revert)

This commit is contained in:
AndrewVolostnykhThingsboard 2021-01-28 17:01:59 +02:00
parent 4d4d189816
commit 70f9da07d8

View File

@ -116,16 +116,16 @@ public class CassandraBaseTimeseriesDao extends AbstractCassandraBaseTimeseriesD
super.startExecutor(); super.startExecutor();
if (!isInstall()) { if (!isInstall()) {
getFetchStmt(Aggregation.NONE, DESC_ORDER); getFetchStmt(Aggregation.NONE, DESC_ORDER);
Optional<NoSqlTsPartitionDate> partition = NoSqlTsPartitionDate.parse(partitioning); }
if (partition.isPresent()) { Optional<NoSqlTsPartitionDate> partition = NoSqlTsPartitionDate.parse(partitioning);
tsFormat = partition.get(); if (partition.isPresent()) {
if (!isFixedPartitioning() && partitionsCacheSize > 0) { tsFormat = partition.get();
cassandraTsPartitionsCache = new CassandraTsPartitionsCache(partitionsCacheSize); if (!isFixedPartitioning() && partitionsCacheSize > 0) {
} cassandraTsPartitionsCache = new CassandraTsPartitionsCache(partitionsCacheSize);
} else {
log.warn("Incorrect configuration of partitioning {}", partitioning);
throw new RuntimeException("Failed to parse partitioning property: " + partitioning + "!");
} }
} else {
log.warn("Incorrect configuration of partitioning {}", partitioning);
throw new RuntimeException("Failed to parse partitioning property: " + partitioning + "!");
} }
} }