You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/10/31 07:50:09 UTC
[iotdb] branch master updated: Rename time_partition to time_partition_interval_for_storage in system.properties file (#7810)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new a3df3a1b14 Rename time_partition to time_partition_interval_for_storage in system.properties file (#7810)
a3df3a1b14 is described below
commit a3df3a1b14ecf8420e7c1da6903ddcd7011834ce
Author: Haonan <hh...@outlook.com>
AuthorDate: Mon Oct 31 15:50:02 2022 +0800
Rename time_partition to time_partition_interval_for_storage in system.properties file (#7810)
---
.../src/main/java/org/apache/iotdb/it/env/MppConfig.java | 3 ++-
.../apache/iotdb/integration/env/ClusterEnvConfig.java | 3 ++-
.../java/org/apache/iotdb/db/conf/IoTDBStartCheck.java | 16 +++++++++-------
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/MppConfig.java b/integration-test/src/main/java/org/apache/iotdb/it/env/MppConfig.java
index fff0d8eaa7..e24496ffd1 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/MppConfig.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/MppConfig.java
@@ -80,7 +80,8 @@ public class MppConfig implements BaseConfig {
@Override
public BaseConfig setPartitionInterval(long partitionInterval) {
- engineProperties.setProperty("partition_interval", String.valueOf(partitionInterval));
+ engineProperties.setProperty(
+ "time_partition_interval_for_storage", String.valueOf(partitionInterval));
return this;
}
diff --git a/integration/src/main/java/org/apache/iotdb/integration/env/ClusterEnvConfig.java b/integration/src/main/java/org/apache/iotdb/integration/env/ClusterEnvConfig.java
index 79ad60ce87..a140eb0798 100644
--- a/integration/src/main/java/org/apache/iotdb/integration/env/ClusterEnvConfig.java
+++ b/integration/src/main/java/org/apache/iotdb/integration/env/ClusterEnvConfig.java
@@ -71,7 +71,8 @@ public class ClusterEnvConfig implements BaseConfig {
}
public BaseConfig setPartitionInterval(long partitionInterval) {
- engineProperties.setProperty("partition_interval", String.valueOf(partitionInterval));
+ engineProperties.setProperty(
+ "time_partition_interval_for_storage", String.valueOf(partitionInterval));
return this;
}
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java
index 7d2ba83f70..bdb2e7f9f2 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java
@@ -74,8 +74,8 @@ public class IoTDBStartCheck {
private static final String TIMESTAMP_PRECISION_STRING = "timestamp_precision";
private static String timestampPrecision = config.getTimestampPrecision();
- private static final String PARTITION_INTERVAL_STRING = "partition_interval";
- private static long partitionInterval = config.getTimePartitionIntervalForStorage();
+ private static final String PARTITION_INTERVAL_STRING = "time_partition_interval_for_storage";
+ private static long timePartitionIntervalForStorage = config.getTimePartitionIntervalForStorage();
private static final String TSFILE_FILE_SYSTEM_STRING = "tsfile_storage_fs";
private static String tsfileFileSystem = config.getTsFileStorageFs().toString();
@@ -178,18 +178,19 @@ public class IoTDBStartCheck {
}
if (!enablePartition) {
- partitionInterval = Long.MAX_VALUE;
+ timePartitionIntervalForStorage = Long.MAX_VALUE;
}
// check partition interval
- if (partitionInterval <= 0) {
+ if (timePartitionIntervalForStorage <= 0) {
logger.error("Partition interval must larger than 0!");
System.exit(-1);
}
systemProperties.put(IOTDB_VERSION_STRING, IoTDBConstant.VERSION);
systemProperties.put(TIMESTAMP_PRECISION_STRING, timestampPrecision);
- systemProperties.put(PARTITION_INTERVAL_STRING, String.valueOf(partitionInterval));
+ systemProperties.put(
+ PARTITION_INTERVAL_STRING, String.valueOf(timePartitionIntervalForStorage));
systemProperties.put(TSFILE_FILE_SYSTEM_STRING, tsfileFileSystem);
systemProperties.put(ENABLE_PARTITION_STRING, String.valueOf(enablePartition));
systemProperties.put(TAG_ATTRIBUTE_SIZE_STRING, tagAttributeTotalSize);
@@ -377,8 +378,9 @@ public class IoTDBStartCheck {
throwException(ENABLE_PARTITION_STRING, enablePartition);
}
- if (Long.parseLong(properties.getProperty(PARTITION_INTERVAL_STRING)) != partitionInterval) {
- throwException(PARTITION_INTERVAL_STRING, partitionInterval);
+ if (Long.parseLong(properties.getProperty(PARTITION_INTERVAL_STRING))
+ != timePartitionIntervalForStorage) {
+ throwException(PARTITION_INTERVAL_STRING, timePartitionIntervalForStorage);
}
if (!(properties.getProperty(TSFILE_FILE_SYSTEM_STRING).equals(tsfileFileSystem))) {