You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/04/27 05:11:01 UTC
[GitHub] [ratis] codings-dan opened a new pull request, #637: Ratis-1461. Add ratis-shell documents
codings-dan opened a new pull request, #637:
URL: https://github.com/apache/ratis/pull/637
see https://issues.apache.org/jira/browse/RATIS-1461
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] szetszwo commented on a diff in pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] codings-dan commented on pull request #637: Ratis-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
codings-dan commented on PR #637:
URL: https://github.com/apache/ratis/pull/637#issuecomment-1112157461
@szetszwo Can you help review this patch, thanks!
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] codings-dan commented on a diff in pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
codings-dan commented on code in PR #637:
URL: https://github.com/apache/ratis/pull/637#discussion_r863467130
##########
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:
done
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] codings-dan commented on pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
codings-dan commented on PR #637:
URL: https://github.com/apache/ratis/pull/637#issuecomment-1118092808
@szetszwo PTAL, thank you!
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] szetszwo merged pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
szetszwo merged PR #637:
URL: https://github.com/apache/ratis/pull/637
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] szetszwo commented on a diff in pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
szetszwo commented on code in PR #637:
URL: https://github.com/apache/ratis/pull/637#discussion_r863473489
##########
ratis-docs/content/cli.md:
##########
@@ -0,0 +1,60 @@
+<!---
+ 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-shell is the command line interface of Ratis.
+The following command can be invoked in order to get the basic usage:
+
+```shell
+$ ratis sh
+Usage: ratis sh [generic options]
+ [election [transfer] [stepDown] [pause] [resume]]
+ [group [info] [list]]
+ [peer [add] [remove] [setPriority]]
+ [snapshot [create]]
+```
+Note: Ratis-shell is currently only experimental, and compatibility story is not considered for the time being
Review Comment:
@codings-dan , thanks for the update. Let's move the Note up and highlight it.
```
# Ratis-shell
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:
```shell
$ ratis sh
Usage: ratis sh [generic options]
[election [transfer] [stepDown] [pause] [resume]]
[group [info] [list]]
[peer [add] [remove] [setPriority]]
[snapshot [create]]
```
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] codings-dan commented on a diff in pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
codings-dan commented on code in PR #637:
URL: https://github.com/apache/ratis/pull/637#discussion_r863467082
##########
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:
Thanks for helping change the description
##########
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:
done
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] codings-dan commented on pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
codings-dan commented on PR #637:
URL: https://github.com/apache/ratis/pull/637#issuecomment-1115718709
@szetszwo Thanks for helping review the patch, PTAL agian, thank you!
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] codings-dan commented on a diff in pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
codings-dan commented on code in PR #637:
URL: https://github.com/apache/ratis/pull/637#discussion_r863466895
##########
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:
done, I will add additional documentation.
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] codings-dan commented on a diff in pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
codings-dan commented on code in PR #637:
URL: https://github.com/apache/ratis/pull/637#discussion_r865510046
##########
ratis-docs/content/cli.md:
##########
@@ -0,0 +1,60 @@
+<!---
+ 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-shell is the command line interface of Ratis.
+The following command can be invoked in order to get the basic usage:
+
+```shell
+$ ratis sh
+Usage: ratis sh [generic options]
+ [election [transfer] [stepDown] [pause] [resume]]
+ [group [info] [list]]
+ [peer [add] [remove] [setPriority]]
+ [snapshot [create]]
+```
+Note: Ratis-shell is currently only experimental, and compatibility story is not considered for the time being
Review Comment:
done
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ratis] szetszwo commented on pull request #637: RATIS-1461. Add ratis-shell documents
Posted by GitBox <gi...@apache.org>.
szetszwo commented on PR #637:
URL: https://github.com/apache/ratis/pull/637#issuecomment-1119241783
Since this is a pure doc change, I will merge this without waiting the tests.
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org