szetszwo commented on code in PR #637:
URL: https://github.com/apache/ratis/pull/637#discussion_r861081810


##########
ratis-docs/content/cli.md:
##########
@@ -0,0 +1,91 @@
+---
+title: Ratis-shell
+menu: main
+weight: -10
+---
+<!---
+  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.
+-->
+
+# Ratis-shell 
+Ratis's commad line interface provides operations to manage the ratis server. 
You can invoke the following command line 
+utility to get all the subcommands:
+
+```shell
+$ cd $PATH_TO_RATIS/ratis-assembly/target/apache-ratis-$version-SNAPSHOT

Review Comment:
   Let's remove this line.  If we want to talk about the path and other setup 
such as classpath, we should have a separated section to include more details.



##########
ratis-docs/content/cli.md:
##########
@@ -0,0 +1,91 @@
+---
+title: Ratis-shell
+menu: main
+weight: -10
+---
+<!---
+  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.
+-->
+
+# Ratis-shell 
+Ratis's commad line interface provides operations to manage the ratis server. 
You can invoke the following command line 
+utility to get all the subcommands:

Review Comment:
   Let's change this to
   ```
   Ratis-shell is the command line interface of Ratis.
   The following command can get all the subcommands:
   ```



##########
ratis-docs/content/cli.md:
##########
@@ -0,0 +1,91 @@
+---
+title: Ratis-shell
+menu: main
+weight: -10
+---
+<!---
+  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.
+-->
+
+# Ratis-shell 
+Ratis's commad line interface provides operations to manage the ratis server. 
You can invoke the following command line 
+utility to get all the subcommands:
+
+```shell
+$ cd $PATH_TO_RATIS/ratis-assembly/target/apache-ratis-$version-SNAPSHOT
+$ ./bin/ratis sh

Review Comment:
   Let's simply use
   ```
   $ ratis sh
   ```
   We may assume `ratis` is already in the PATH.



##########
ratis-docs/content/cli.md:
##########
@@ -0,0 +1,91 @@
+---
+title: Ratis-shell
+menu: main
+weight: -10
+---

Review Comment:
   These few lines seem not working as expected.



##########
ratis-docs/content/cli.md:
##########
@@ -0,0 +1,91 @@
+---
+title: Ratis-shell
+menu: main
+weight: -10
+---
+<!---
+  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.
+-->
+
+# Ratis-shell 
+Ratis's commad line interface provides operations to manage the ratis server. 
You can invoke the following command line 
+utility to get all the subcommands:
+
+```shell
+$ cd $PATH_TO_RATIS/ratis-assembly/target/apache-ratis-$version-SNAPSHOT
+$ ./bin/ratis sh
+Usage: ratis sh [generic options]
+         [election [transfer] [stepDown] [pause] [resume]]         
+         [group [info] [list]]                                     
+         [peer [add] [remove] [setPriority]]                       
+         [snapshot [create]]  
+```
+
+## Operations:
+
+### election
+
+The `election` command manage ratis leader election, it has four 
subcommands:`transfer`、`stepDown`、`pause`、`resume`
+
+```
+# Switch the ratis leader to the specified ratis server(its address is 
<HOSTNAME:PORT>).
+$ ./bin/ratis sh election transfer -peers 
<PEER0_HOST:PEER0_PORT,PEER1_HOST:PEER1_PORT,PEER2_HOST:PEER2_PORT> -address 
<HOSTNAME:PORT> [-groupid <RAFT_GROUP_ID>]

Review Comment:
   Let's use a shorter peer list 
`<P0_HOST:P0_PORT,P1_HOST:P1_PORT,P2_HOST:P2_PORT>`.



##########
ratis-docs/content/cli.md:
##########
@@ -0,0 +1,91 @@
+---
+title: Ratis-shell
+menu: main
+weight: -10
+---
+<!---
+  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.
+-->
+
+# Ratis-shell 
+Ratis's commad line interface provides operations to manage the ratis server. 
You can invoke the following command line 
+utility to get all the subcommands:
+
+```shell
+$ cd $PATH_TO_RATIS/ratis-assembly/target/apache-ratis-$version-SNAPSHOT
+$ ./bin/ratis sh
+Usage: ratis sh [generic options]
+         [election [transfer] [stepDown] [pause] [resume]]         
+         [group [info] [list]]                                     
+         [peer [add] [remove] [setPriority]]                       
+         [snapshot [create]]  
+```
+
+## Operations:
+
+### election

Review Comment:
   ## election
   The `election` command manages leader election. 
   It has the following subcommands:
   `transfer`, `stepDown`, `pause`, `resume`
   
   ### election transfer
   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>]
   ```
   
   ### election stepDown
   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>]
   ```
   
   ### election pause
   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>]
   ```
   
   ### election resume
   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>]
   ```
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to