You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/02/04 15:37:43 UTC

[GitHub] [iotdb] weizihan0110 opened a new pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

weizihan0110 opened a new pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] weizihan0110 commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
weizihan0110 commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579663717



##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本
+```
+#!/bin/bash  
+
+#配置节点个数
+NODE_NUM=3
+
+export CLUSTER_JAR_PATH=./
+#表示如 cluster-0.11.0-SNAPSHOT 的字符串变量
+CLUSTER_SNAPSHOT_NAME=$(find $CLUSTER_JAR_PATH -name "cluster-*-SNAPSHOT" | sed 's#.*/##')
+
+#端口配置
+RPC_PORT=6667
+JMX_PORT=31999
+internal_meta_port=9005
+internal_data_port=40012
+cluster_rpc_port=55561
+
+for((i=1,rpc_port=$RPC_PORT,jmx_port=$JMX_PORT;i<=$NODE_NUM;i++,rpc_port++,jmx_port++));  
+do   
+temp_name="$CLUSTER_SNAPSHOT_NAME"$i
+#第一步(复制IoTDB集群包)
+cp -rf $CLUSTER_JAR_PATH/$CLUSTER_SNAPSHOT_NAME $CLUSTER_JAR_PATH/$temp_name
+
+#第二步(分别修改rpc与jmx端口)
+sed -i -e "s/${RPC_PORT}/${rpc_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-engine.properties
+sed -i -e "s/${JMX_PORT}/${jmx_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-env.sh
+done  
+
+#第三步(更改权限)
+chmod -R 777 $CLUSTER_JAR_PATH/

Review comment:
       current folder are ./cluster/target/.
   I'll make it clearer




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] weizihan0110 closed pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
weizihan0110 closed pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] neuyilan commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
neuyilan commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579652161



##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本

Review comment:
       Where to set the n-1 copy? At present, the default copy is 2 copies. I do not see the logic to modify the number of copies in the script?

##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本
+```
+#!/bin/bash  
+
+#配置节点个数
+NODE_NUM=3
+
+export CLUSTER_JAR_PATH=./
+#表示如 cluster-0.11.0-SNAPSHOT 的字符串变量
+CLUSTER_SNAPSHOT_NAME=$(find $CLUSTER_JAR_PATH -name "cluster-*-SNAPSHOT" | sed 's#.*/##')
+
+#端口配置
+RPC_PORT=6667
+JMX_PORT=31999
+internal_meta_port=9005
+internal_data_port=40012
+cluster_rpc_port=55561
+
+for((i=1,rpc_port=$RPC_PORT,jmx_port=$JMX_PORT;i<=$NODE_NUM;i++,rpc_port++,jmx_port++));  
+do   
+temp_name="$CLUSTER_SNAPSHOT_NAME"$i
+#第一步(复制IoTDB集群包)
+cp -rf $CLUSTER_JAR_PATH/$CLUSTER_SNAPSHOT_NAME $CLUSTER_JAR_PATH/$temp_name
+
+#第二步(分别修改rpc与jmx端口)
+sed -i -e "s/${RPC_PORT}/${rpc_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-engine.properties
+sed -i -e "s/${JMX_PORT}/${jmx_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-env.sh
+done  
+
+#第三步(更改权限)
+chmod -R 777 $CLUSTER_JAR_PATH/

Review comment:
       If there are other files under the current folder, the permissions of these files have been modified, which is a little too big? Just modify some script execution permissions of iotdb is ok.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] neuyilan commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
neuyilan commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579767931



##########
File path: docs/UserGuide/Server/Cluster Setup.md
##########
@@ -76,6 +76,55 @@ When both exist, the specified configuration item will overwrite the configurati
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
 
+## One-click build script of n nodes and n-1 replicas pseudo-distributed.
+```
+#!/bin/bash  
+
+#config the number of node
+NODE_NUM=3
+
+export CLUSTER_JAR_PATH=./
+#CLUSTER_SNAPSHOT_NAME is something like cluster-0.11.0-SNAPSHOT
+CLUSTER_SNAPSHOT_NAME=$(find $CLUSTER_JAR_PATH -name "cluster-*-SNAPSHOT" | sed 's#.*/##')

Review comment:
       After 0.12 was released, the folder name will not contain SNAPSHOT, it may looks like `iotdb-cluster-0.12-bin.zip`, if the user wants to use this script to deploy the cluster,  it will not work.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] neuyilan commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
neuyilan commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579767206



##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本

Review comment:
       You may not understand me. The number of copies is `default_ replica_ num` parameter in iotdb-cluster.properties to control,  `NODE_NUM`  can not control the number of copies, it can only  control the number of nodes. For example, set NODE_NUM = 5, but the copy is still 2, not 4.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] weizihan0110 commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
weizihan0110 commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579663717



##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本
+```
+#!/bin/bash  
+
+#配置节点个数
+NODE_NUM=3
+
+export CLUSTER_JAR_PATH=./
+#表示如 cluster-0.11.0-SNAPSHOT 的字符串变量
+CLUSTER_SNAPSHOT_NAME=$(find $CLUSTER_JAR_PATH -name "cluster-*-SNAPSHOT" | sed 's#.*/##')
+
+#端口配置
+RPC_PORT=6667
+JMX_PORT=31999
+internal_meta_port=9005
+internal_data_port=40012
+cluster_rpc_port=55561
+
+for((i=1,rpc_port=$RPC_PORT,jmx_port=$JMX_PORT;i<=$NODE_NUM;i++,rpc_port++,jmx_port++));  
+do   
+temp_name="$CLUSTER_SNAPSHOT_NAME"$i
+#第一步(复制IoTDB集群包)
+cp -rf $CLUSTER_JAR_PATH/$CLUSTER_SNAPSHOT_NAME $CLUSTER_JAR_PATH/$temp_name
+
+#第二步(分别修改rpc与jmx端口)
+sed -i -e "s/${RPC_PORT}/${rpc_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-engine.properties
+sed -i -e "s/${JMX_PORT}/${jmx_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-env.sh
+done  
+
+#第三步(更改权限)
+chmod -R 777 $CLUSTER_JAR_PATH/

Review comment:
       current folder should be ./cluster/target/ (all files belongs to iotdb)
   I'll make it clearer




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] weizihan0110 commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
weizihan0110 commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579663331



##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本

Review comment:
       NODE_NUM can be any number. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] weizihan0110 commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
weizihan0110 commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579664686



##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本

Review comment:
       > Besides, there[1] are scripts that can deploy pseudo-distributed or distributed easily, maybe we can combine both?
   > [1] https://github.com/LebronAl/QuickDeployForIoTDBTesting
   
   Hi, @neuyilan:
      I'll be so glad if you can contribute scripts at[1] to IoTDB :)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] weizihan0110 commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
weizihan0110 commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579663717



##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本
+```
+#!/bin/bash  
+
+#配置节点个数
+NODE_NUM=3
+
+export CLUSTER_JAR_PATH=./
+#表示如 cluster-0.11.0-SNAPSHOT 的字符串变量
+CLUSTER_SNAPSHOT_NAME=$(find $CLUSTER_JAR_PATH -name "cluster-*-SNAPSHOT" | sed 's#.*/##')
+
+#端口配置
+RPC_PORT=6667
+JMX_PORT=31999
+internal_meta_port=9005
+internal_data_port=40012
+cluster_rpc_port=55561
+
+for((i=1,rpc_port=$RPC_PORT,jmx_port=$JMX_PORT;i<=$NODE_NUM;i++,rpc_port++,jmx_port++));  
+do   
+temp_name="$CLUSTER_SNAPSHOT_NAME"$i
+#第一步(复制IoTDB集群包)
+cp -rf $CLUSTER_JAR_PATH/$CLUSTER_SNAPSHOT_NAME $CLUSTER_JAR_PATH/$temp_name
+
+#第二步(分别修改rpc与jmx端口)
+sed -i -e "s/${RPC_PORT}/${rpc_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-engine.properties
+sed -i -e "s/${JMX_PORT}/${jmx_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-env.sh
+done  
+
+#第三步(更改权限)
+chmod -R 777 $CLUSTER_JAR_PATH/

Review comment:
       current folder are ./cluster/target/.(all files belongs to iotdb)
   I'll make it clearer




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] neuyilan commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
neuyilan commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579767507



##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本
+```
+#!/bin/bash  
+
+#配置节点个数
+NODE_NUM=3
+
+export CLUSTER_JAR_PATH=./
+#表示如 cluster-0.11.0-SNAPSHOT 的字符串变量
+CLUSTER_SNAPSHOT_NAME=$(find $CLUSTER_JAR_PATH -name "cluster-*-SNAPSHOT" | sed 's#.*/##')
+
+#端口配置
+RPC_PORT=6667
+JMX_PORT=31999
+internal_meta_port=9005
+internal_data_port=40012
+cluster_rpc_port=55561
+
+for((i=1,rpc_port=$RPC_PORT,jmx_port=$JMX_PORT;i<=$NODE_NUM;i++,rpc_port++,jmx_port++));  
+do   
+temp_name="$CLUSTER_SNAPSHOT_NAME"$i
+#第一步(复制IoTDB集群包)
+cp -rf $CLUSTER_JAR_PATH/$CLUSTER_SNAPSHOT_NAME $CLUSTER_JAR_PATH/$temp_name
+
+#第二步(分别修改rpc与jmx端口)
+sed -i -e "s/${RPC_PORT}/${rpc_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-engine.properties
+sed -i -e "s/${JMX_PORT}/${jmx_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-env.sh
+done  
+
+#第三步(更改权限)
+chmod -R 777 $CLUSTER_JAR_PATH/

Review comment:
       The user may not want to deploy the cluster in the target folder, we can't take it for granted. Just modify some script execution permissions of IOTDB_PATH/sbin or IOTDB_PATH/conf is ok enough.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] weizihan0110 commented on a change in pull request #2632: one-click build script of N-node n-1 copy pseudo-distributed.

Posted by GitBox <gi...@apache.org>.
weizihan0110 commented on a change in pull request #2632:
URL: https://github.com/apache/iotdb/pull/2632#discussion_r579663717



##########
File path: docs/zh/UserGuide/Server/Cluster Setup.md
##########
@@ -69,6 +69,55 @@ or
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT1\sbin\start-node.bat  -internal_meta_port 9005 -internal_data_port 40012 -cluster_rpc_port 55561
 > nohup cluster\target\cluster-0.11.0-SNAPSHOT2\sbin\start-node.bat  -internal_meta_port 9007 -internal_data_port 40014 -cluster_rpc_port 55562
 ```
+## n节点n-1副本伪分布式一键搭建脚本
+```
+#!/bin/bash  
+
+#配置节点个数
+NODE_NUM=3
+
+export CLUSTER_JAR_PATH=./
+#表示如 cluster-0.11.0-SNAPSHOT 的字符串变量
+CLUSTER_SNAPSHOT_NAME=$(find $CLUSTER_JAR_PATH -name "cluster-*-SNAPSHOT" | sed 's#.*/##')
+
+#端口配置
+RPC_PORT=6667
+JMX_PORT=31999
+internal_meta_port=9005
+internal_data_port=40012
+cluster_rpc_port=55561
+
+for((i=1,rpc_port=$RPC_PORT,jmx_port=$JMX_PORT;i<=$NODE_NUM;i++,rpc_port++,jmx_port++));  
+do   
+temp_name="$CLUSTER_SNAPSHOT_NAME"$i
+#第一步(复制IoTDB集群包)
+cp -rf $CLUSTER_JAR_PATH/$CLUSTER_SNAPSHOT_NAME $CLUSTER_JAR_PATH/$temp_name
+
+#第二步(分别修改rpc与jmx端口)
+sed -i -e "s/${RPC_PORT}/${rpc_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-engine.properties
+sed -i -e "s/${JMX_PORT}/${jmx_port}/g" $CLUSTER_JAR_PATH/$temp_name/conf/iotdb-env.sh
+done  
+
+#第三步(更改权限)
+chmod -R 777 $CLUSTER_JAR_PATH/

Review comment:
       current folder are ./cluster/target/ (all files belongs to iotdb)
   I'll make it clearer




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org