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 2022/11/26 01:23:16 UTC

[GitHub] [iotdb] Beyyes commented on a diff in pull request #8152: [IOTDB-5013] Added simple standalone logic for starting and stopping shells

Beyyes commented on code in PR #8152:
URL: https://github.com/apache/iotdb/pull/8152#discussion_r1032720809


##########
docs/UserGuide/Cluster/Cluster-Setup.md:
##########
@@ -147,20 +147,72 @@ Please set the important parameters in iotdb-datanode.properties:
 Start on Linux:
 ```
 # Foreground
-./sbin/start-datanode.sh
+bash ./sbin/start-datanode.sh
 
 # Background
-nohup ./sbin/start-datanode.sh >/dev/null 2>&1 &
+nohup bash ./sbin/start-datanode.sh >/dev/null 2>&1 &
 ```
 
 Start on Windows:
 ```
 sbin\start-datanode.bat
 ```
 
-More details [DataNode Configurations](https://iotdb.apache.org/UserGuide/Master/Reference/DataNode-Config-Manual.html).
+More details are in [DataNode Configurations](https://iotdb.apache.org/UserGuide/Master/Reference/DataNode-Config-Manual.html).
 
-### Start Cli
+### Stop IoTDB
+When you meet problem, and want to stop IoTDB ConfigNode and DataNode directly, our shells can help you do this.
+
+In Windows:
+
+```
+sbin\stop-datanode.bat
+```
+```
+sbin\stop-confignode.bat
+```
+In Linux:
+```
+sudo bash sbin\stop-datanode.sh
+```
+```
+sudo bash sbin\stop-confignode.sh
+```
+Be careful not to miss the "sudo" label, because some port info's acquisition may require root authority. If you can't sudo, just
+use "jps" or "ps aux | grep iotdb" to get the process's id, then use "kill -9 <process-id>" to stop the process.  
+
+## Start StandAlone
+If you just want to setup your IoTDB locally, 
+You can quickly init 1C1D (i.e. 1 Confignode and 1 Datanode) environment by our shells.
+
+This will work well if you don't change our default settings.
+
+Start on Windows:
+```
+sbin\start-datanode.bat
+```
+Start on Linux:
+```
+sudo bash sbin\start-standalone.sh
+```
+Besides, with our shell, you can also directly kill these processes.
+
+Stop on Windows:
+```
+sbin\stop-datanode.bat

Review Comment:
   ```suggestion
   sbin\stop-standalone.bat
   ```



##########
docs/UserGuide/Cluster/Cluster-Setup.md:
##########
@@ -147,20 +147,72 @@ Please set the important parameters in iotdb-datanode.properties:
 Start on Linux:
 ```
 # Foreground
-./sbin/start-datanode.sh
+bash ./sbin/start-datanode.sh
 
 # Background
-nohup ./sbin/start-datanode.sh >/dev/null 2>&1 &
+nohup bash ./sbin/start-datanode.sh >/dev/null 2>&1 &
 ```
 
 Start on Windows:
 ```
 sbin\start-datanode.bat
 ```
 
-More details [DataNode Configurations](https://iotdb.apache.org/UserGuide/Master/Reference/DataNode-Config-Manual.html).
+More details are in [DataNode Configurations](https://iotdb.apache.org/UserGuide/Master/Reference/DataNode-Config-Manual.html).
 
-### Start Cli
+### Stop IoTDB
+When you meet problem, and want to stop IoTDB ConfigNode and DataNode directly, our shells can help you do this.
+
+In Windows:
+
+```
+sbin\stop-datanode.bat
+```
+```
+sbin\stop-confignode.bat
+```
+In Linux:
+```
+sudo bash sbin\stop-datanode.sh
+```
+```
+sudo bash sbin\stop-confignode.sh
+```
+Be careful not to miss the "sudo" label, because some port info's acquisition may require root authority. If you can't sudo, just
+use "jps" or "ps aux | grep iotdb" to get the process's id, then use "kill -9 <process-id>" to stop the process.  
+
+## Start StandAlone
+If you just want to setup your IoTDB locally, 
+You can quickly init 1C1D (i.e. 1 Confignode and 1 Datanode) environment by our shells.
+
+This will work well if you don't change our default settings.
+
+Start on Windows:
+```
+sbin\start-datanode.bat

Review Comment:
   ```suggestion
   sbin\start-standalone.bat
   ```



##########
node-commons/src/assembly/resources/sbin/start-standalone.sh:
##########
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+nohup bash start-confignode.sh > confignode1.log 2>&1 &
+sleep 6s

Review Comment:
   ```suggestion
   sleep 6
   ```



##########
docs/zh/UserGuide/Cluster/Cluster-Setup.md:
##########
@@ -160,6 +160,54 @@ sbin\start-datanode.bat
 
 具体参考 [DataNode配置参数](https://iotdb.apache.org/zh/UserGuide/Master/Reference/DataNode-Config-Manual.html)。
 
+### 停止 IoTDB 进程
+如果你碰到了问题,希望手动关闭 IoTDB 的 ConfigNode 和 DataNode 进程,可以使用我们的脚本。
+
+在 Windows 上:
+
+```
+sbin\stop-datanode.bat
+```
+```
+sbin\stop-confignode.bat
+```
+在 Linux 上:
+```
+sudo bash sbin\stop-datanode.sh
+```
+```
+sudo bash sbin\stop-confignode.sh
+```
+
+注意不要遗漏 ”sudo“ 的标签,因为一些端口信息的获取需要 root 权限。如果无法 sudo 或遇到其他问题,可以使用 jps 或 ps aux | grep iotdb 的命令来获取 IoTDB 的进程,然后使用 kill -9 进程号来结束此进程。
+## 启动单机
+除了集群之外, 我们的脚本也提供了单机 1C1D(也就是1个Confignode + 1个Datanode) 的便捷启动方式。
+
+在不更改配置文件的情况下,该脚本可以成功执行。
+
+Windows 启动方式:
+```
+sbin\start-datanode.bat

Review Comment:
   ```suggestion
   sbin\start-standalone.bat
   ```



##########
docs/zh/UserGuide/Cluster/Cluster-Setup.md:
##########
@@ -160,6 +160,54 @@ sbin\start-datanode.bat
 
 具体参考 [DataNode配置参数](https://iotdb.apache.org/zh/UserGuide/Master/Reference/DataNode-Config-Manual.html)。
 
+### 停止 IoTDB 进程
+如果你碰到了问题,希望手动关闭 IoTDB 的 ConfigNode 和 DataNode 进程,可以使用我们的脚本。
+
+在 Windows 上:
+
+```
+sbin\stop-datanode.bat
+```
+```
+sbin\stop-confignode.bat
+```
+在 Linux 上:
+```
+sudo bash sbin\stop-datanode.sh
+```
+```
+sudo bash sbin\stop-confignode.sh
+```
+
+注意不要遗漏 ”sudo“ 的标签,因为一些端口信息的获取需要 root 权限。如果无法 sudo 或遇到其他问题,可以使用 jps 或 ps aux | grep iotdb 的命令来获取 IoTDB 的进程,然后使用 kill -9 进程号来结束此进程。
+## 启动单机
+除了集群之外, 我们的脚本也提供了单机 1C1D(也就是1个Confignode + 1个Datanode) 的便捷启动方式。
+
+在不更改配置文件的情况下,该脚本可以成功执行。
+
+Windows 启动方式:
+```
+sbin\start-datanode.bat
+```
+Linux 启动方式:
+```
+sudo bash sbin\start-standalone.sh
+```
+也可以使用脚本直接关闭这些进程。
+
+Windows 停止方式:
+```
+sbin\stop-datanode.bat

Review Comment:
   ```suggestion
   sbin\stop-standalone.bat
   ```



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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