aboutsummaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2013-02-25 19:34:32 -0800
committerMatei Zaharia <matei@eecs.berkeley.edu>2013-02-25 19:34:32 -0800
commit5d7b591cfe14177f083814fe3e81745c5d279810 (patch)
tree0fd84b8a60d4ae79d3165f34159ded0e1b97c135 /run
parent7b8853493248f4b2855a548facc407a3db939ba0 (diff)
downloadspark-5d7b591cfe14177f083814fe3e81745c5d279810.tar.gz
spark-5d7b591cfe14177f083814fe3e81745c5d279810.tar.bz2
spark-5d7b591cfe14177f083814fe3e81745c5d279810.zip
Pass a code JAR to SparkContext in our examples. Fixes SPARK-594.
Diffstat (limited to 'run')
-rwxr-xr-xrun10
1 files changed, 10 insertions, 0 deletions
diff --git a/run b/run
index fd06fbe7c7..2c780623c8 100755
--- a/run
+++ b/run
@@ -134,6 +134,16 @@ for jar in `find $PYSPARK_DIR/lib -name '*jar'`; do
done
export CLASSPATH # Needed for spark-shell
+# Figure out the JAR file that our examples were packaged into.
+if [ -e "$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples"*".jar" ]; then
+ # Use the JAR from the SBT build
+ export SPARK_EXAMPLES_JAR=`ls "$EXAMPLES_DIR/target/scala-$SCALA_VERSION/spark-examples"*".jar"`
+fi
+if [ -e "$EXAMPLES_DIR/target/spark-examples-"*hadoop*".jar" ]; then
+ # Use the JAR from the Maven build
+ export SPARK_EXAMPLES_JAR=`ls "$EXAMPLES_DIR/target/spark-examples-"*hadoop*".jar"`
+fi
+
# Figure out whether to run our class with java or with the scala launcher.
# In most cases, we'd prefer to execute our process with java because scala
# creates a shell script as the parent of its Java process, which makes it