Skip to content

Commit

Permalink
[SPARK-874] adding a --wait flag
Browse files Browse the repository at this point in the history
This PR adds a --wait flag to the `./sbin/stop-all.sh` script.

Author: jbencook <[email protected]>

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

d05c5bb [jbencook] [SPARK-874] adding a --wait flag
  • Loading branch information
jbencook authored and pwendell committed Dec 9, 2014
1 parent 912563a commit 61f1a70
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions sbin/stop-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,20 @@ sbin="`cd "$sbin"; pwd`"
# Stop the slaves, then the master
"$sbin"/stop-slaves.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 comments on commit 61f1a70

Please sign in to comment.