This is an automated email from the ASF dual-hosted git repository. elserj pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git
commit f76d77938cf5069e55e96a48d571de29fd5d2805 Author: Josh Elser <[email protected]> AuthorDate: Wed Apr 10 20:24:40 2019 -0400 RATIS-527. Basic script wrappers around common logservice commands --- ratis-logservice/README.md | 10 +++++++++- ratis-logservice/src/assembly/assembly.xml | 7 +++++++ ratis-logservice/src/assembly/bin/load-test | 23 +++++++++++++++++++++++ ratis-logservice/src/assembly/bin/shell | 23 +++++++++++++++++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) diff --git a/ratis-logservice/README.md b/ratis-logservice/README.md index 8337257..b473f18 100644 --- a/ratis-logservice/README.md +++ b/ratis-logservice/README.md @@ -83,4 +83,12 @@ $ ./client-env.sh $ ./bin/shell -q master1.logservice.ratis.org:9999,master2.logservice.ratis.org:9999,master3.logservice.ratis.org:9999 ``` -Take care that the correct network is provided to the LogServiceShell command. +Or, you can launch the verification tool to generate load on the cluster: +```bash +$ ./client-env.sh +$ ./bin/load-test -q master1.logservice.ratis.org:9999,master2.logservice.ratis.org:9999,master3.logservice.ratis.org:9999 +``` + +`client-env.sh` launches a Docker container that can communicate with the LogService cluster running from +`docker-compose`. You can do this by hand, but take care that the correct network is provided when launching your +container. diff --git a/ratis-logservice/src/assembly/assembly.xml b/ratis-logservice/src/assembly/assembly.xml index 739a2bb..7f287d8 100644 --- a/ratis-logservice/src/assembly/assembly.xml +++ b/ratis-logservice/src/assembly/assembly.xml @@ -42,5 +42,12 @@ <include>log4j.properties</include> </includes> </fileSet> + <fileSet> + <directory>src/assembly/bin</directory> + <includes> + <include>*</include> + </includes> + <outputDirectory>bin</outputDirectory> + </fileSet> </fileSets> </assembly> diff --git a/ratis-logservice/src/assembly/bin/load-test b/ratis-logservice/src/assembly/bin/load-test new file mode 100755 index 0000000..7867667 --- /dev/null +++ b/ratis-logservice/src/assembly/bin/load-test @@ -0,0 +1,23 @@ +#!/bin/sh +# +# 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. + +LOGSERVICE="$(dirname "$0")" +LOGSERVICE="$(cd "$LOGSERVICE/..">/dev/null; pwd)" + +export CLASSPATH="${LOGSERVICE}/conf:${LOGSERVICE}/lib/*" +exec java -XX:OnOutOfMemoryError="kill -9 %p" $LOGSERVICE_OPTS org.apache.ratis.logservice.tool.VerificationTool "$@" diff --git a/ratis-logservice/src/assembly/bin/shell b/ratis-logservice/src/assembly/bin/shell new file mode 100755 index 0000000..5a78ea6 --- /dev/null +++ b/ratis-logservice/src/assembly/bin/shell @@ -0,0 +1,23 @@ +#!/bin/sh +# +# 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. + +LOGSERVICE="$(dirname "$0")" +LOGSERVICE="$(cd "$LOGSERVICE/..">/dev/null; pwd)" + +export CLASSPATH="${LOGSERVICE}/conf:${LOGSERVICE}/lib/*" +exec java -XX:OnOutOfMemoryError="kill -9 %p" $LOGSERVICE_OPTS org.apache.ratis.logservice.shell.LogServiceShell "$@"
