You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mw...@apache.org on 2018/02/08 19:11:48 UTC
[accumulo] branch master updated: ACCUMULO-4802 Added kill command
to accumulo-cluster script (#377)
This is an automated email from the ASF dual-hosted git repository.
mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/master by this push:
new a4ff798 ACCUMULO-4802 Added kill command to accumulo-cluster script (#377)
a4ff798 is described below
commit a4ff7981df0f5622b4c68e34f24423e3365ee188
Author: Mike Walch <mw...@apache.org>
AuthorDate: Thu Feb 8 14:11:45 2018 -0500
ACCUMULO-4802 Added kill command to accumulo-cluster script (#377)
---
assemble/bin/accumulo-cluster | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/assemble/bin/accumulo-cluster b/assemble/bin/accumulo-cluster
index ddf8d5d..77320c8 100755
--- a/assemble/bin/accumulo-cluster
+++ b/assemble/bin/accumulo-cluster
@@ -24,6 +24,7 @@ Commands:
restart Restarts the Accumulo cluster
start Starts Accumulo cluster
stop Stops Accumulo cluster
+ kill Kills Accumulo cluster
start-non-tservers Starts all services except tservers
start-tservers Starts all tservers on cluster
stop-tservers Stops all tservers on cluster
@@ -221,8 +222,34 @@ function stop_tservers() {
${accumulo_cmd} org.apache.accumulo.server.util.ZooZap -tservers
}
+function kill_all() {
+ echo "Killing Accumulo cluster..."
+
+ for master in $(grep -v '^#' "${conf}/masters"); do
+ kill_service "$master" master
+ done
+
+ for gc in $(grep -v '^#' "${conf}/gc"); do
+ kill_service "$gc" gc
+ done
+
+ kill_service "$monitor" monitor
+
+ for tracer in $(egrep -v '(^#|^\s*$)' "${conf}/tracers"); do
+ kill_service "$tracer" tracer
+ done
+
+ for host in $(egrep -v '(^#|^\s*$)' "${conf}/tservers"); do
+ kill_service "$host" tserver
+ done
+
+ echo "Cleaning all server entries in ZooKeeper"
+ ${accumulo_cmd} org.apache.accumulo.server.util.ZooZap -master -tservers -tracers --site-file "${conf}/accumulo-site.xml"
+}
+
+
function stop_all() {
- echo "Stopping accumulo services..."
+ echo "Stopping Accumulo cluster..."
if ! ${accumulo_cmd} admin stopAll
then
echo "Invalid password or unable to connect to the master"
@@ -326,6 +353,10 @@ function main() {
verify_config
stop_all
;;
+ kill)
+ verify_config
+ kill_all
+ ;;
start-non-tservers)
verify_config
start_all --no-tservers
--
To stop receiving notification emails like this one, please contact
mwalch@apache.org.