Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add start and stop script for Counter example #178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chainho
Copy link

@chainho chainho commented Aug 11, 2020

Add handy tool for start or stop three Ratis server at once

Hello,
I am a new user for Ratis.
I found that in example module, there is no convenient method to start three Ratis server for testing, user have to specified one by one in terminal or IDE.

So, the scripts can be a handy tool for new user testing.
Hope it helpful.

Shucheng Hou

@amaliujia
Copy link
Contributor

@runzhiwang

Do you think whether this patch is useful for Ratis?

source $DIR/common.sh

# One of the examples, e.g. "filestore" or "arithmetic"
example="$1"
Copy link
Contributor

@amaliujia amaliujia Sep 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be better to print a list of examples and then allow user to choose (which should include validation)

example="$1"
shift

subcommand="$1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for subcommand

# See the License for the specific language governing permissions and
# limitations under the License.

kill $(jps -lv | grep 'ratis' | grep 'CounterServer' | grep -v 'grep' | awk '{print $1}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity: will this way leave garbages generated by servers locally?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, I think ratis-examples/src/main/bin./stop-all.sh will server your stop server purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants