Skip to content

Commit

Permalink
use - shell commad
Browse files Browse the repository at this point in the history
Change-Id: I3eedce199cae965d8ed2d64708d059298acb5356
  • Loading branch information
Linary committed Apr 16, 2021
1 parent f940846 commit eaf8ed6
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions hugegraph-dist/src/assembly/static/bin/raft-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ LOG_PATH=${HOME_PATH}/logs
function print_usage() {
echo "usage: raft-tools.sh [options]"
echo "options: "
echo " -l,--list_peers \${graph} \${group} list all peers' endpoints for graph, can be used on leader or follower node"
echo " -g,--get_leader \${graph} \${group} get the leader endpoint for graph, can be used on leader or follower node"
echo " -s,--set_leader \${graph} \${group} \${endpoint} set the leader endpoint for graph, can be used on leader or follower node"
echo " -t,--transfer_leader \${graph} \${group} \${endpoint} transfer leader to specified endpoint for graph, can be used on leader node"
echo " -a,--add_peer \${graph} \${group} \${endpoint} add peer for graph, can be used on leader node"
echo " -r,--remove_peer \${graph} \${group} \${endpoint} remove peer for graph, can be used on leader node"
echo " -l,--list-peers \${graph} \${group} list all peers' endpoints for graph, can be used on leader or follower node"
echo " -g,--get-leader \${graph} \${group} get the leader endpoint for graph, can be used on leader or follower node"
echo " -s,--set-leader \${graph} \${group} \${endpoint} set the leader endpoint for graph, can be used on leader or follower node"
echo " -t,--transfer-leader \${graph} \${group} \${endpoint} transfer leader to specified endpoint for graph, can be used on leader node"
echo " -a,--add-peer \${graph} \${group} \${endpoint} add peer for graph, can be used on leader node"
echo " -r,--remove-peer \${graph} \${group} \${endpoint} remove peer for graph, can be used on leader node"
echo " -h,--help display help information"
}

Expand Down Expand Up @@ -91,28 +91,28 @@ case $1 in
--help|-h)
print_usage
;;
# list_peers
--list_peers|-l)
# list-peers
--list-peers|-l)
list_peers $2
;;
# get_leader
--get_leader|-g)
# get-leader
--get-leader|-g)
get_leader $2
;;
# set_leader
--set_leader|-s)
# set-leader
--set-leader|-s)
set_leader $2 $3
;;
# transfer_leader
--transfer_leader|-t)
# transfer-leader
--transfer-leader|-t)
transfer_leader $2 $3
;;
# add_peer
--add_peer|-a)
# add-peer
--add-peer|-a)
add_peer $2 $3
;;
# remove_peer
--remove_peer|-r)
# remove-peer
--remove-peer|-r)
remove_peer $2 $3
;;
*)
Expand Down

0 comments on commit eaf8ed6

Please sign in to comment.