Skip to content

Commit d05c5bb

Browse files
author
jbencook
committed
[SPARK-874] adding a --wait flag
1 parent 17c162f commit d05c5bb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

sbin/stop-all.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,20 @@ sbin="`cd "$sbin"; pwd`"
3030
# Stop the slaves, then the master
3131
"$sbin"/stop-slaves.sh
3232
"$sbin"/stop-master.sh
33+
34+
if [ "$1" == "--wait" ]
35+
then
36+
printf "Waiting for workers to shut down..."
37+
while true
38+
do
39+
running=`$sbin/slaves.sh ps -ef | grep -v grep | grep deploy.worker.Worker`
40+
if [ -z "$running" ]
41+
then
42+
printf "\nAll workers successfully shut down.\n"
43+
break
44+
else
45+
printf "."
46+
sleep 10
47+
fi
48+
done
49+
fi

0 commit comments

Comments
 (0)