You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by lt...@apache.org on 2019/06/27 12:08:29 UTC

[incubator-iotdb] branch cluster updated: add trim of nodes address when initialization

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

lta pushed a commit to branch cluster
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/cluster by this push:
     new d969533  add trim of nodes address when initialization
d969533 is described below

commit d9695331dea7c0f0555f3fc51aef713818fec023
Author: lta <li...@163.com>
AuthorDate: Thu Jun 27 20:08:08 2019 +0800

    add trim of nodes address when initialization
---
 .../java/org/apache/iotdb/cluster/config/ClusterDescriptor.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterDescriptor.java b/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterDescriptor.java
index 2e67d6a..56fba70 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterDescriptor.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/config/ClusterDescriptor.java
@@ -92,8 +92,12 @@ public class ClusterDescriptor {
     Properties properties = new Properties();
     try {
       properties.load(inputStream);
-      conf.setNodes(properties.getProperty("nodes", ClusterConfig.DEFAULT_NODE)
-          .split(","));
+      String[] nodes = properties.getProperty("nodes", ClusterConfig.DEFAULT_NODE)
+          .split(",");
+      for(int i = 0 ; i < nodes.length ; i++){
+        nodes[i] = nodes[i].trim();
+      }
+      conf.setNodes(nodes);
 
       conf.setReplication(Integer
           .parseInt(properties.getProperty("replication",