Skip to content

Commit

Permalink
add --help with remove-xx script (#12585)
Browse files Browse the repository at this point in the history
  • Loading branch information
CritasWang authored May 28, 2024
1 parent 4403bb8 commit baf37c3
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
@REM

@echo off

IF "%~1"=="--help" (
echo The script will remove a ConfigNode.
echo Before removing a ConfigNode, ensure that there is at least one active ConfigNode in the cluster after the removal.
echo Usage:
echo Remove the ConfigNode with confignode_id
echo ./sbin/remove-confignode.sh [confignode_id]
echo Remove the ConfigNode with address:port
echo ./sbin/remove-confignode.sh [cn_internal_address:cn_internal_port]
EXIT /B 0
)

echo ```````````````````````````
echo Starting to remove IoTDB ConfigNode
echo ```````````````````````````
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
# under the License.
#

if [ "$#" -eq 1 ] && [ "$1" == "--help" ]; then
echo "The script will remove a ConfigNode."
echo "Before removing a ConfigNode, ensure that there is at least one active ConfigNode in the cluster after the removal."
echo "Usage:"
echo "Remove the ConfigNode with confignode_id"
echo "./sbin/remove-confignode.sh [confignode_id]"
echo "Remove the ConfigNode with address:port"
echo "./sbin/remove-confignode.sh [cn_internal_address:cn_internal_port]"
exit 0
fi

echo ----------------------------
echo Starting to remove IoTDB ConfigNode
echo ----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
@REM

@echo off

IF "%~1"=="--help" (
echo The script will remove a DataNode.
echo Before removing a DataNode, ensure that the cluster has at least the number of data/schema replicas DataNodes.
echo Usage:
echo Remove the DataNode with datanode_id
echo ./sbin/remove-datanode.sh [datanode_id]
echo Remove the DataNode with address:port
echo ./sbin/remove-confignode.sh [dn_rpc_address:dn_rpc_port]
EXIT /B 0
)

echo ````````````````````````
echo Starting to remove a DataNode
echo ````````````````````````
Expand Down
11 changes: 11 additions & 0 deletions iotdb-core/datanode/src/assembly/resources/sbin/remove-datanode.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
# under the License.
#

if [ "$#" -eq 1 ] && [ "$1" == "--help" ]; then
echo "The script will remove a DataNode."
echo "Before removing a DataNode, ensure that the cluster has at least the number of data/schema replicas DataNodes."
echo "Usage:"
echo "Remove the DataNode with datanode_id"
echo "./sbin/remove-datanode.sh [datanode_id]"
echo "Remove the DataNode with address:port"
echo "./sbin/remove-confignode.sh [dn_rpc_address:dn_rpc_port]"
exit 0
fi

echo ---------------------
echo "Starting to remove a DataNode"
echo ---------------------
Expand Down

0 comments on commit baf37c3

Please sign in to comment.