This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch IOTDB-4619
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/IOTDB-4619 by this push:
new f5bd5c1d40 Add parameter check
f5bd5c1d40 is described below
commit f5bd5c1d4044d784702d9ba5451085578150e404
Author: JackieTien97 <[email protected]>
AuthorDate: Mon Oct 17 20:36:25 2022 +0800
Add parameter check
---
.../confignode/conf/ConfigNodeDescriptor.java | 27 ++++++++++++++++++----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
index 05d7759908..bc7f9f6ce0 100644
---
a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
+++
b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
@@ -478,16 +478,33 @@ public class ConfigNodeDescriptor {
}
private void loadCQConfig(Properties properties) {
- conf.setCqSubmitThread(
+ int cqSubmitThread =
Integer.parseInt(
properties.getProperty(
- "continuous_query_submit_thread",
String.valueOf(conf.getCqSubmitThread()))));
+ "continuous_query_submit_thread",
String.valueOf(conf.getCqSubmitThread())));
+ if (cqSubmitThread <= 0) {
+ LOGGER.warn(
+ "continuous_query_submit_thread should be greater than 0, but
current value is {}, ignore that and use the default value {}",
+ cqSubmitThread,
+ conf.getCqSubmitThread());
+ cqSubmitThread = conf.getCqSubmitThread();
+ }
+ conf.setCqSubmitThread(cqSubmitThread);
- conf.setCqMinEveryIntervalInMs(
- Integer.parseInt(
+ long cqMinEveryIntervalInMs =
+ Long.parseLong(
properties.getProperty(
"continuous_query_min_every_interval_in_ms",
- String.valueOf(conf.getCqMinEveryIntervalInMs()))));
+ String.valueOf(conf.getCqMinEveryIntervalInMs())));
+ if (cqMinEveryIntervalInMs <= 0) {
+ LOGGER.warn(
+ "continuous_query_min_every_interval_in_ms should be greater than 0,
but current value is {}, ignore that and use the default value {}",
+ cqMinEveryIntervalInMs,
+ conf.getCqMinEveryIntervalInMs());
+ cqMinEveryIntervalInMs = conf.getCqMinEveryIntervalInMs();
+ }
+
+ conf.setCqMinEveryIntervalInMs(cqMinEveryIntervalInMs);
}
/**