diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-04-07 20:54:18 -0400 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-04-07 20:54:18 -0400 |
commit | 1cb3eb9762439caea10fe817d9c69c01c3c8fb06 (patch) | |
tree | 8368349ec0419ded144c26eea8c039ff189d0731 /bin/stop-slaves.sh | |
parent | a1586412d647da1a192259a58b10d50b02f02a9c (diff) | |
parent | aa9134f72a13cdc1fd1a662ec9389724e8e0e35f (diff) | |
download | spark-1cb3eb9762439caea10fe817d9c69c01c3c8fb06.tar.gz spark-1cb3eb9762439caea10fe817d9c69c01c3c8fb06.tar.bz2 spark-1cb3eb9762439caea10fe817d9c69c01c3c8fb06.zip |
Merge remote-tracking branch 'kalpit/master'
Conflicts:
project/SparkBuild.scala
Diffstat (limited to 'bin/stop-slaves.sh')
-rwxr-xr-x | bin/stop-slaves.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/stop-slaves.sh b/bin/stop-slaves.sh index 21c9ebf324..fbfc594472 100755 --- a/bin/stop-slaves.sh +++ b/bin/stop-slaves.sh @@ -7,4 +7,14 @@ bin=`cd "$bin"; pwd` . "$bin/spark-config.sh" -"$bin"/spark-daemons.sh stop spark.deploy.worker.Worker
\ No newline at end of file +if [ -f "${SPARK_CONF_DIR}/spark-env.sh" ]; then + . "${SPARK_CONF_DIR}/spark-env.sh" +fi + +if [ "$SPARK_WORKER_INSTANCES" = "" ]; then + "$bin"/spark-daemons.sh stop spark.deploy.worker.Worker 1 +else + for ((i=0; i<$SPARK_WORKER_INSTANCES; i++)); do + "$bin"/spark-daemons.sh stop spark.deploy.worker.Worker $(( $i + 1 )) + done +fi |