You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/06/22 01:02:22 UTC
[iotdb] branch master updated: [IOTDB-5999] System properties patch
This is an automated email from the ASF dual-hosted git repository.
jackietien 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 82e85d9983b [IOTDB-5999] System properties patch
82e85d9983b is described below
commit 82e85d9983bcbd361853eaa6cd74c5ac7add5e0c
Author: YongzaoDan <33...@users.noreply.github.com>
AuthorDate: Thu Jun 22 09:02:15 2023 +0800
[IOTDB-5999] System properties patch
---
.../iotdb/confignode/conf/SystemPropertiesUtils.java | 15 +++++++++++++++
.../org/apache/iotdb/commons/conf/CommonDescriptor.java | 5 +++++
2 files changed, 20 insertions(+)
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java b/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java
index 4406c80d7b2..54d4907297f 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java
@@ -181,6 +181,21 @@ public class SystemPropertiesUtils {
conf.setSeriesPartitionExecutorClass(seriesPartitionSlotExecutorClass);
}
+ if (systemProperties.getProperty("time_partition_interval", null) == null) {
+ needReWrite = true;
+ } else {
+ long timePartitionInterval =
+ Long.parseLong(systemProperties.getProperty("time_partition_interval"));
+ if (timePartitionInterval != COMMON_CONFIG.getTimePartitionInterval()) {
+ LOGGER.warn(
+ format,
+ "time_partition_interval",
+ COMMON_CONFIG.getTimePartitionInterval(),
+ timePartitionInterval);
+ COMMON_CONFIG.setTimePartitionInterval(timePartitionInterval);
+ }
+ }
+
if (needReWrite) {
// Re-write special parameters if necessary
storeSystemParameters();
diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonDescriptor.java b/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonDescriptor.java
index 2ab38b9dbb4..7dd417d5b3b 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonDescriptor.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonDescriptor.java
@@ -229,6 +229,11 @@ public class CommonDescriptor {
Integer.parseInt(
properties.getProperty(
"tag_attribute_total_size", String.valueOf(config.getTagAttributeTotalSize()))));
+
+ config.setTimePartitionInterval(
+ Long.parseLong(
+ properties.getProperty(
+ "time_partition_interval", String.valueOf(config.getTimePartitionInterval()))));
}
private void loadPipeProps(Properties properties) {