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 2021/07/03 01:20:12 UTC

[iotdb] branch rel/0.12 updated: Fix Load configuration command shows null error message #3458 (#3491)

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch rel/0.12
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/0.12 by this push:
     new 5c03e61   Fix Load configuration command shows null error message #3458 (#3491)
5c03e61 is described below

commit 5c03e6121f5deff5b4a6ed575b295bbd7f886aa7
Author: Hang Ji <55...@users.noreply.github.com>
AuthorDate: Sat Jul 3 09:19:46 2021 +0800

     Fix Load configuration command shows null error message #3458 (#3491)
---
 .../org/apache/iotdb/db/conf/IoTDBDescriptor.java  | 30 +++++++++++++++-------
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
index f382b5d..6738921 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
@@ -1012,22 +1012,34 @@ public class IoTDBDescriptor {
 
       // update max_deduplicated_path_num
       conf.setMaxQueryDeduplicatedPathNum(
-          Integer.parseInt(properties.getProperty("max_deduplicated_path_num")));
-
+          Integer.parseInt(
+              properties.getProperty(
+                  "max_deduplicated_path_num",
+                  Integer.toString(conf.getMaxQueryDeduplicatedPathNum()))));
       // update frequency_interval_in_minute
       conf.setFrequencyIntervalInMinute(
-          Integer.parseInt(properties.getProperty("frequency_interval_in_minute")));
-
+          Integer.parseInt(
+              properties.getProperty(
+                  "frequency_interval_in_minute",
+                  Integer.toString(conf.getFrequencyIntervalInMinute()))));
       // update slow_query_threshold
-      conf.setSlowQueryThreshold(Long.parseLong(properties.getProperty("slow_query_threshold")));
-
+      conf.setSlowQueryThreshold(
+          Long.parseLong(
+              properties.getProperty(
+                  "slow_query_threshold", Long.toString(conf.getSlowQueryThreshold()))));
       // update enable_continuous_compaction
       conf.setEnableContinuousCompaction(
-          Boolean.parseBoolean(properties.getProperty("enable_continuous_compaction")));
-
+          Boolean.parseBoolean(
+              properties.getProperty(
+                  "enable_continuous_compaction",
+                  Boolean.toString(conf.isEnableContinuousCompaction()))));
       // update merge_write_throughput_mb_per_sec
       conf.setMergeWriteThroughputMbPerSec(
-          Integer.parseInt(properties.getProperty("merge_write_throughput_mb_per_sec")));
+          Integer.parseInt(
+              properties.getProperty(
+                  "merge_write_throughput_mb_per_sec",
+                  Integer.toString(conf.getMergeWriteThroughputMbPerSec()))));
+
     } catch (Exception e) {
       throw new QueryProcessException(String.format("Fail to reload configuration because %s", e));
     }