Skip to content
Snippets Groups Projects
Commit 61f1a702 authored by jbencook's avatar jbencook Committed by Patrick Wendell
Browse files

[SPARK-874] adding a --wait flag

This PR adds a --wait flag to the `./sbin/stop-all.sh` script.

Author: jbencook <jbenjamincook@gmail.com>

Closes #3567 from jbencook/master and squashes the following commits:

d05c5bb [jbencook] [SPARK-874] adding a --wait flag
parent 912563aa
No related branches found
No related tags found
No related merge requests found
...@@ -30,3 +30,20 @@ sbin="`cd "$sbin"; pwd`" ...@@ -30,3 +30,20 @@ sbin="`cd "$sbin"; pwd`"
# Stop the slaves, then the master # Stop the slaves, then the master
"$sbin"/stop-slaves.sh "$sbin"/stop-slaves.sh
"$sbin"/stop-master.sh "$sbin"/stop-master.sh
if [ "$1" == "--wait" ]
then
printf "Waiting for workers to shut down..."
while true
do
running=`$sbin/slaves.sh ps -ef | grep -v grep | grep deploy.worker.Worker`
if [ -z "$running" ]
then
printf "\nAll workers successfully shut down.\n"
break
else
printf "."
sleep 10
fi
done
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment