aboutsummaryrefslogtreecommitdiff
path: root/make-distribution.sh
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2013-08-23 23:30:17 -0700
committerMatei Zaharia <matei@eecs.berkeley.edu>2013-08-29 21:19:04 -0700
commit53cd50c0699efc8733518658100c62426b425de2 (patch)
tree334e1924a46f7faafe680f46d910ce3e6ac5edc6 /make-distribution.sh
parentabdbacf2521ec40ee03ecc8e1aae8823013f24f1 (diff)
downloadspark-53cd50c0699efc8733518658100c62426b425de2.tar.gz
spark-53cd50c0699efc8733518658100c62426b425de2.tar.bz2
spark-53cd50c0699efc8733518658100c62426b425de2.zip
Change build and run instructions to use assemblies
This commit makes Spark invocation saner by using an assembly JAR to find all of Spark's dependencies instead of adding all the JARs in lib_managed. It also packages the examples into an assembly and uses that as SPARK_EXAMPLES_JAR. Finally, it replaces the old "run" script with two better-named scripts: "run-examples" for examples, and "spark-class" for Spark internal classes (e.g. REPL, master, etc). This is also designed to minimize the confusion people have in trying to use "run" to run their own classes; it's not meant to do that, but now at least if they look at it, they can modify run-examples to do a decent job for them. As part of this, Bagel's examples are also now properly moved to the examples package instead of bagel.
Diffstat (limited to 'make-distribution.sh')
-rwxr-xr-xmake-distribution.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/make-distribution.sh b/make-distribution.sh
index 70aff418c7..df7bbf1e74 100755
--- a/make-distribution.sh
+++ b/make-distribution.sh
@@ -47,7 +47,7 @@ VERSION=$($FWDIR/sbt/sbt "show version" | tail -1 | cut -f 2 | sed 's/^\([a-zA-Z
# Initialize defaults
SPARK_HADOOP_VERSION=1.0.4
-SPARK_WITH_YARN=false
+SPARK_YARN=false
MAKE_TGZ=false
# Parse arguments
@@ -58,7 +58,7 @@ while (( "$#" )); do
shift
;;
--with-yarn)
- SPARK_WITH_YARN=true
+ SPARK_YARN=true
;;
--tgz)
MAKE_TGZ=true
@@ -74,7 +74,7 @@ else
fi
echo "Hadoop version set to $SPARK_HADOOP_VERSION"
-if [ "$SPARK_WITH_YARN" == "true" ]; then
+if [ "$SPARK_YARN" == "true" ]; then
echo "YARN enabled"
else
echo "YARN disabled"
@@ -82,21 +82,22 @@ fi
# Build fat JAR
export SPARK_HADOOP_VERSION
-export SPARK_WITH_YARN
-"$FWDIR/sbt/sbt" "repl/assembly"
+export SPARK_YARN
+"$FWDIR/sbt/sbt" "assembly/assembly"
# Make directories
rm -rf "$DISTDIR"
mkdir -p "$DISTDIR/jars"
-echo "$VERSION" > "$DISTDIR/RELEASE"
+echo "Spark $VERSION built for Hadoop $SPARK_HADOOP_VERSION" > "$DISTDIR/RELEASE"
# Copy jars
-cp $FWDIR/repl/target/*.jar "$DISTDIR/jars/"
+cp $FWDIR/assembly/target/*/*assembly*.jar "$DISTDIR/jars/"
# Copy other things
cp -r "$FWDIR/bin" "$DISTDIR"
cp -r "$FWDIR/conf" "$DISTDIR"
-cp "$FWDIR/run" "$FWDIR/spark-shell" "$DISTDIR"
+cp "$FWDIR/spark-class" "$DISTDIR"
+cp "$FWDIR/spark-shell" "$DISTDIR"
cp "$FWDIR/spark-executor" "$DISTDIR"