Skip to content

Commit

Permalink
Only try tachyon operations if tachyon script exists
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklan committed Mar 18, 2014
1 parent 0561574 commit 111e8e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions sbin/start-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ START_TACHYON=false
while (( "$#" )); do
case $1 in
--with-tachyon)
if [ ! -e "$sbin"/tachyon/bin/tachyon ]; then
echo "Error: --with-tachyon specified, but tachyon not found."
exit -1
fi
START_TACHYON=true
;;
esac
Expand Down
4 changes: 3 additions & 1 deletion sbin/stop-slaves.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ if [ -f "${SPARK_CONF_DIR}/spark-env.sh" ]; then
fi

# do before the below calls as they exec
"$sbin/slaves.sh" cd "$SPARK_HOME" \; "$sbin"/tachyon/bin/tachyon killAll tachyon.worker.Worker
if [ -e "$sbin"/tachyon/bin/tachyon ]; then
"$sbin/slaves.sh" cd "$SPARK_HOME" \; "$sbin"/tachyon/bin/tachyon killAll tachyon.worker.Worker
fi

if [ "$SPARK_WORKER_INSTANCES" = "" ]; then
"$sbin"/spark-daemons.sh stop org.apache.spark.deploy.worker.Worker 1
Expand Down

0 comments on commit 111e8e1

Please sign in to comment.