diff options
author | Nick Lanham <nick@afternight.org> | 2014-03-18 22:04:57 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-03-18 22:04:57 -0700 |
commit | a18ea00f3af0fa4c6b2c59933e22b6c9f0f636c8 (patch) | |
tree | be8b2783a2a93724bcbbdcf115cbd8f628292ef9 /sbin/start-master.sh | |
parent | cc2655a237442a71c75d4fade99767df7648e55f (diff) | |
download | spark-a18ea00f3af0fa4c6b2c59933e22b6c9f0f636c8.tar.gz spark-a18ea00f3af0fa4c6b2c59933e22b6c9f0f636c8.tar.bz2 spark-a18ea00f3af0fa4c6b2c59933e22b6c9f0f636c8.zip |
Bundle tachyon: SPARK-1269
This should all work as expected with the current version of the tachyon tarball (0.4.1)
Author: Nick Lanham <nick@afternight.org>
Closes #137 from nicklan/bundle-tachyon and squashes the following commits:
2eee15b [Nick Lanham] Put back in exec, start tachyon first
738ba23 [Nick Lanham] Move tachyon out of sbin
f2f9bc6 [Nick Lanham] More checks for tachyon script
111e8e1 [Nick Lanham] Only try tachyon operations if tachyon script exists
0561574 [Nick Lanham] Copy over web resources so web interface can run
4dc9809 [Nick Lanham] Update to tachyon 0.4.1
0a1a20c [Nick Lanham] Add scripts using tachyon tarball
Diffstat (limited to 'sbin/start-master.sh')
-rwxr-xr-x | sbin/start-master.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sbin/start-master.sh b/sbin/start-master.sh index ec3dfdb419..03a3428aea 100755 --- a/sbin/start-master.sh +++ b/sbin/start-master.sh @@ -22,6 +22,21 @@ sbin=`dirname "$0"` sbin=`cd "$sbin"; pwd` +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 +shift +done + . "$sbin/spark-config.sh" if [ -f "${SPARK_CONF_DIR}/spark-env.sh" ]; then @@ -41,3 +56,9 @@ if [ "$SPARK_MASTER_WEBUI_PORT" = "" ]; then fi "$sbin"/spark-daemon.sh start org.apache.spark.deploy.master.Master 1 --ip $SPARK_MASTER_IP --port $SPARK_MASTER_PORT --webui-port $SPARK_MASTER_WEBUI_PORT + +if [ "$START_TACHYON" == "true" ]; then + "$sbin"/../tachyon/bin/tachyon bootstrap-conf $SPARK_MASTER_IP + "$sbin"/../tachyon/bin/tachyon format -s + "$sbin"/../tachyon/bin/tachyon-start.sh master +fi |