Skip to content

Commit 111e8e1

Browse files
committed
Only try tachyon operations if tachyon script exists
1 parent 0561574 commit 111e8e1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

sbin/start-master.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ START_TACHYON=false
2727
while (( "$#" )); do
2828
case $1 in
2929
--with-tachyon)
30+
if [ ! -e "$sbin"/tachyon/bin/tachyon ]; then
31+
echo "Error: --with-tachyon specified, but tachyon not found."
32+
exit -1
33+
fi
3034
START_TACHYON=true
3135
;;
3236
esac

sbin/stop-slaves.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ if [ -f "${SPARK_CONF_DIR}/spark-env.sh" ]; then
2727
fi
2828

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

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

0 commit comments

Comments
 (0)