Ratis-shell is the command line interface of Ratis.
Note: Ratis-shell is currently only experimental. The compatibility story is not considered for the time being.
The following command can be invoked in order to get the basic usage:
$ ratis sh
Usage: ratis sh [generic options]
[election [transfer] [stepDown] [pause] [resume]]
[group [info] [list]]
[peer [add] [remove] [setPriority]]
[snapshot [create]]
The election
command manages leader election.
It has the following subcommands:
transfer
, stepDown
, pause
, resume
Transfer a group leader to the specified server.
$ ratis sh election transfer -peers <P0_HOST:P0_PORT,P1_HOST:P1_PORT,P2_HOST:P2_PORT> -address <HOSTNAME:PORT> [-groupid <RAFT_GROUP_ID>]
Make a group leader of the given group step down its leadership.
$ ratis sh election stepDown -peers <P0_HOST:P0_PORT,P1_HOST:P1_PORT,P2_HOST:P2_PORT> [-groupid <RAFT_GROUP_ID>]
Pause leader election at the specified server. Then, the specified server would not start a leader election.
$ ratis sh election pause -peers <P0_HOST:P0_PORT,P1_HOST:P1_PORT,P2_HOST:P2_PORT> -address <HOSTNAME:PORT> [-groupid <RAFT_GROUP_ID>]
Resume leader election at the specified server.
$ ratis sh election resume -peers <P0_HOST:P0_PORT,P1_HOST:P1_PORT,P2_HOST:P2_PORT> -address <HOSTNAME:PORT> [-groupid <RAFT_GROUP_ID>]