aboutsummaryrefslogtreecommitdiff
path: root/make-distribution.sh
diff options
context:
space:
mode:
authorNick Lanham <nick@afternight.org>2014-03-18 22:04:57 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-03-18 22:04:57 -0700
commita18ea00f3af0fa4c6b2c59933e22b6c9f0f636c8 (patch)
treebe8b2783a2a93724bcbbdcf115cbd8f628292ef9 /make-distribution.sh
parentcc2655a237442a71c75d4fade99767df7648e55f (diff)
downloadspark-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 'make-distribution.sh')
-rwxr-xr-xmake-distribution.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/make-distribution.sh b/make-distribution.sh
index e6b5956d1e..6bc6819d8d 100755
--- a/make-distribution.sh
+++ b/make-distribution.sh
@@ -58,6 +58,7 @@ echo "Version is ${VERSION}"
# Initialize defaults
SPARK_HADOOP_VERSION=1.0.4
SPARK_YARN=false
+SPARK_TACHYON=false
MAKE_TGZ=false
# Parse arguments
@@ -70,6 +71,9 @@ while (( "$#" )); do
--with-yarn)
SPARK_YARN=true
;;
+ --with-tachyon)
+ SPARK_TACHYON=true
+ ;;
--tgz)
MAKE_TGZ=true
;;
@@ -90,6 +94,12 @@ else
echo "YARN disabled"
fi
+if [ "$SPARK_TACHYON" == "true" ]; then
+ echo "Tachyon Enabled"
+else
+ echo "Tachyon Disabled"
+fi
+
# Build fat JAR
export SPARK_HADOOP_VERSION
export SPARK_YARN
@@ -113,6 +123,28 @@ cp -r "$FWDIR/python" "$DISTDIR"
cp -r "$FWDIR/sbin" "$DISTDIR"
+# Download and copy in tachyon, if requested
+if [ "$SPARK_TACHYON" == "true" ]; then
+ TACHYON_VERSION="0.4.1"
+ TACHYON_URL="https://github.com/amplab/tachyon/releases/download/v${TACHYON_VERSION}/tachyon-${TACHYON_VERSION}-bin.tar.gz"
+
+ TMPD=`mktemp -d`
+
+ pushd $TMPD > /dev/null
+ echo "Fetchting tachyon tgz"
+ wget "$TACHYON_URL"
+
+ tar xf "tachyon-${TACHYON_VERSION}-bin.tar.gz"
+ cp "tachyon-${TACHYON_VERSION}/target/tachyon-${TACHYON_VERSION}-jar-with-dependencies.jar" "$DISTDIR/jars"
+ mkdir -p "$DISTDIR/tachyon/src/main/java/tachyon/web"
+ cp -r "tachyon-${TACHYON_VERSION}"/{bin,conf,libexec} "$DISTDIR/tachyon"
+ cp -r "tachyon-${TACHYON_VERSION}"/src/main/java/tachyon/web/resources "$DISTDIR/tachyon/src/main/java/tachyon/web"
+ sed -i "s|export TACHYON_JAR=\$TACHYON_HOME/target/\(.*\)|# This is set for spark's make-distribution\n export TACHYON_JAR=\$TACHYON_HOME/../../jars/\1|" "$DISTDIR/tachyon/libexec/tachyon-config.sh"
+
+ popd > /dev/null
+ rm -rf $TMPD
+fi
+
if [ "$MAKE_TGZ" == "true" ]; then
TARDIR="$FWDIR/spark-$VERSION"
cp -r "$DISTDIR" "$TARDIR"