Browse Source
Merge pull request #4022 from AndrewVolosytnykhThingsboard/cassandraBaseTimeseriesDaoFix
CassandraBaseTimeseriesDao init method fix (revert)
pull/4059/head
Igor Kulikov
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
9 deletions
-
dao/src/main/java/org/thingsboard/server/dao/timeseries/CassandraBaseTimeseriesDao.java
|
|
|
@ -116,16 +116,16 @@ public class CassandraBaseTimeseriesDao extends AbstractCassandraBaseTimeseriesD |
|
|
|
super.startExecutor(); |
|
|
|
if (!isInstall()) { |
|
|
|
getFetchStmt(Aggregation.NONE, DESC_ORDER); |
|
|
|
Optional<NoSqlTsPartitionDate> partition = NoSqlTsPartitionDate.parse(partitioning); |
|
|
|
if (partition.isPresent()) { |
|
|
|
tsFormat = partition.get(); |
|
|
|
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 + "!"); |
|
|
|
} |
|
|
|
Optional<NoSqlTsPartitionDate> partition = NoSqlTsPartitionDate.parse(partitioning); |
|
|
|
if (partition.isPresent()) { |
|
|
|
tsFormat = partition.get(); |
|
|
|
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 + "!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|