Repository: spark Updated Branches: refs/heads/master 912563aa3 -> 61f1a7022
[SPARK-874] adding a --wait flag This PR adds a --wait flag to the `./sbin/stop-all.sh` script. Author: jbencook <[email protected]> Closes #3567 from jbencook/master and squashes the following commits: d05c5bb [jbencook] [SPARK-874] adding a --wait flag Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/61f1a702 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/61f1a702 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/61f1a702 Branch: refs/heads/master Commit: 61f1a7022767e64ab092aa91c0c5aa1b2fdbef7c Parents: 912563a Author: jbencook <[email protected]> Authored: Tue Dec 9 12:16:19 2014 -0800 Committer: Patrick Wendell <[email protected]> Committed: Tue Dec 9 12:16:19 2014 -0800 ---------------------------------------------------------------------- sbin/stop-all.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/61f1a702/sbin/stop-all.sh ---------------------------------------------------------------------- diff --git a/sbin/stop-all.sh b/sbin/stop-all.sh index 298c6a9..971d5d4 100755 --- a/sbin/stop-all.sh +++ b/sbin/stop-all.sh @@ -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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
