aboutsummaryrefslogtreecommitdiff
path: root/run2.cmd
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 /run2.cmd
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 'run2.cmd')
-rw-r--r--run2.cmd10
1 files changed, 10 insertions, 0 deletions
diff --git a/run2.cmd b/run2.cmd
index 705a4d1ff6..f34869f1b1 100644
--- a/run2.cmd
+++ b/run2.cmd
@@ -62,6 +62,16 @@ set CLASSPATH=%CLASSPATH%;%FWDIR%repl\lib\*
set CLASSPATH=%CLASSPATH%;%FWDIR%python\lib\*
set CLASSPATH=%CLASSPATH%;%BAGEL_DIR%\target\scala-%SCALA_VERSION%\classes
+rem Figure out the JAR file that our examples were packaged into.
+rem First search in the build path from SBT:
+for /D %%d in ("%EXAMPLES_DIR%/target/scala-%SCALA_VERSION%/spark-examples*.jar") do (
+ set SPARK_EXAMPLES_JAR=%%d
+)
+rem Then search in the build path from Maven:
+for /D %%d in ("%EXAMPLES_DIR%/target/spark-examples*hadoop*.jar") do (
+ set SPARK_EXAMPLES_JAR=%%d
+)
+
rem Figure out whether to run our class with java or with the scala launcher.
rem In most cases, we'd prefer to execute our process with java because scala
rem creates a shell script as the parent of its Java process, which makes it