aboutsummaryrefslogtreecommitdiff
path: root/run-example
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2013-08-27 19:23:54 -0700
committerMatei Zaharia <matei@eecs.berkeley.edu>2013-08-29 21:19:06 -0700
commit666d93c294458cb056cb590eb11bb6cf979861e5 (patch)
tree8a05c1073bef461b141c60736052a1f029e3da38 /run-example
parentd7dec938e503b86d1b338c4df3439d3649a76294 (diff)
downloadspark-666d93c294458cb056cb590eb11bb6cf979861e5.tar.gz
spark-666d93c294458cb056cb590eb11bb6cf979861e5.tar.bz2
spark-666d93c294458cb056cb590eb11bb6cf979861e5.zip
Update Maven build to create assemblies expected by new scripts
This includes the following changes: - The "assembly" package now builds in Maven by default, and creates an assembly containing both hadoop-client and Spark, unlike the old BigTop distribution assembly that skipped hadoop-client - There is now a bigtop-dist package to build the old BigTop assembly - The repl-bin package is no longer built by default since the scripts don't reply on it; instead it can be enabled with -Prepl-bin - Py4J is now included in the assembly/lib folder as a local Maven repo, so that the Maven package can link to it - run-example now adds the original Spark classpath as well because the Maven examples assembly lists spark-core and such as provided - The various Maven projects add a spark-yarn dependency correctly
Diffstat (limited to 'run-example')
-rwxr-xr-xrun-example9
1 files changed, 7 insertions, 2 deletions
diff --git a/run-example b/run-example
index e1b26257e1..ccd4356bdf 100755
--- a/run-example
+++ b/run-example
@@ -54,6 +54,11 @@ if [[ -z $SPARK_EXAMPLES_JAR ]]; then
exit 1
fi
+# Since the examples JAR ideally shouldn't include spark-core (that dependency should be
+# "provided"), also add our standard Spark classpath, built using compute-classpath.sh.
+CLASSPATH=`$FWDIR/bin/compute-classpath.sh`
+CLASSPATH="$SPARK_EXAMPLES_JAR:$CLASSPATH"
+
# Find java binary
if [ -n "${JAVA_HOME}" ]; then
RUNNER="${JAVA_HOME}/bin/java"
@@ -68,9 +73,9 @@ fi
if [ "$SPARK_PRINT_LAUNCH_COMMAND" == "1" ]; then
echo -n "Spark Command: "
- echo "$RUNNER" -cp "$SPARK_EXAMPLES_JAR" "$@"
+ echo "$RUNNER" -cp "$CLASSPATH" "$@"
echo "========================================"
echo
fi
-exec "$RUNNER" -cp "$SPARK_EXAMPLES_JAR" "$@"
+exec "$RUNNER" -cp "$CLASSPATH" "$@"