You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by yo...@apache.org on 2023/03/09 14:19:04 UTC
[iotdb] 01/01: Update IoTDBDescriptor.java
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch Compatible-with-the-client-parameters-on-DataNode
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 62812415ce797feab7f3068292e732f239f9babf
Author: YongzaoDan <53...@qq.com>
AuthorDate: Thu Mar 9 22:18:50 2023 +0800
Update IoTDBDescriptor.java
---
.../org/apache/iotdb/db/conf/IoTDBDescriptor.java | 44 +++++++++++++---------
1 file changed, 27 insertions(+), 17 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 43c5976bb5..21a943c753 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
@@ -229,29 +229,39 @@ public class IoTDBDescriptor {
"dn_connection_timeout_ms", String.valueOf(conf.getConnectionTimeoutInMS()))
.trim()));
- String dnCoreClientCount =
- properties.getProperty("dn_core_client_count_for_each_node_in_client_manager", null);
- if (dnCoreClientCount == null) {
- // For compatible
- dnCoreClientCount = properties.getProperty("dn_core_connection_for_internal_service", null);
+ if (properties.getProperty("dn_core_client_count_for_each_node_in_client_manager", null)
+ != null) {
+ conf.setCoreClientNumForEachNode(
+ Integer.parseInt(
+ properties.getProperty("dn_core_connection_for_internal_service").trim()));
logger.warn(
"The parameter dn_core_connection_for_internal_service is out of date. Please rename it to dn_core_client_count_for_each_node_in_client_manager.");
}
- if (dnCoreClientCount != null) {
- conf.setCoreClientNumForEachNode(Integer.parseInt(dnCoreClientCount));
- }
+ conf.setCoreClientNumForEachNode(
+ Integer.parseInt(
+ properties
+ .getProperty(
+ "dn_core_client_count_for_each_node_in_client_manager",
+ String.valueOf(conf.getCoreClientNumForEachNode()))
+ .trim()));
- String dnMaxClientCount =
- properties.getProperty("dn_max_client_count_for_each_node_in_client_manager", null);
- if (dnMaxClientCount == null) {
- // For compatible
- dnMaxClientCount = properties.getProperty("dn_max_connection_for_internal_service", null);
+ if (properties.getProperty("dn_max_client_count_for_each_node_in_client_manager", null)
+ != null) {
+ conf.setMaxClientNumForEachNode(
+ Integer.parseInt(
+ properties
+ .getProperty("dn_max_client_count_for_each_node_in_client_manager")
+ .trim()));
logger.warn(
- "The parameter dn_max_connection_for_internal_service is out of date. Please rename it to dn_max_client_count_for_each_node_in_client_manager.");
- }
- if (dnMaxClientCount != null) {
- conf.setMaxClientNumForEachNode(Integer.parseInt(dnMaxClientCount));
+ "The parameter dn_max_client_count_for_each_node_in_client_manager is out of date. Please rename it to dn_max_client_count_for_each_node_in_client_manager.");
}
+ conf.setMaxClientNumForEachNode(
+ Integer.parseInt(
+ properties
+ .getProperty(
+ "dn_max_connection_for_internal_service",
+ String.valueOf(conf.getMaxClientNumForEachNode()))
+ .trim()));
conf.setSelectorNumOfClientManager(
Integer.parseInt(