Updated Branches: refs/heads/master 87954d4c8 -> 3efc01956
Add spark-tools assembly to spark-class classpath. This allows the JavaAPICompletenessChecker to be run with Spark 0.8+. Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/a37ff0f1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/a37ff0f1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/a37ff0f1 Branch: refs/heads/master Commit: a37ff0f1dbae977744fdd3f7d4a2d6873fe9c70f Parents: 72a601e Author: Josh Rosen <[email protected]> Authored: Sat Nov 9 13:37:11 2013 -0800 Committer: Josh Rosen <[email protected]> Committed: Sat Nov 9 13:42:45 2013 -0800 ---------------------------------------------------------------------- project/SparkBuild.scala | 2 +- spark-class | 13 +++++++++++++ spark-class2.cmd | 7 +++++++ 3 files changed, 21 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/a37ff0f1/project/SparkBuild.scala ---------------------------------------------------------------------- diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 45fd30a..115570d 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -265,7 +265,7 @@ object SparkBuild extends Build { def toolsSettings = sharedSettings ++ Seq( name := "spark-tools" - ) + ) ++ assemblySettings ++ extraAssemblySettings def bagelSettings = sharedSettings ++ Seq( name := "spark-bagel" http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/a37ff0f1/spark-class ---------------------------------------------------------------------- diff --git a/spark-class b/spark-class index fb9d1a4..bbeca7f 100755 --- a/spark-class +++ b/spark-class @@ -110,8 +110,21 @@ if [ ! -f "$FWDIR/RELEASE" ]; then fi fi +TOOLS_DIR="$FWDIR"/tools +SPARK_TOOLS_JAR="" +if [ -e "$TOOLS_DIR"/target/scala-$SCALA_VERSION/*assembly*[0-9Tg].jar ]; then + # Use the JAR from the SBT build + export SPARK_TOOLS_JAR=`ls "$TOOLS_DIR"/target/scala-$SCALA_VERSION/*assembly*[0-9Tg].jar` +fi +if [ -e "$TOOLS_DIR"/target/spark-tools*[0-9Tg].jar ]; then + # Use the JAR from the Maven build + # TODO: this also needs to become an assembly! + export SPARK_TOOLS_JAR=`ls "$TOOLS_DIR"/target/spark-tools*[0-9Tg].jar` +fi + # Compute classpath using external script CLASSPATH=`$FWDIR/bin/compute-classpath.sh` +CLASSPATH="$SPARK_TOOLS_JAR:$CLASSPATH" export CLASSPATH if [ "$SPARK_PRINT_LAUNCH_COMMAND" == "1" ]; then http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/a37ff0f1/spark-class2.cmd ---------------------------------------------------------------------- diff --git a/spark-class2.cmd b/spark-class2.cmd index d4d853e..3869d07 100644 --- a/spark-class2.cmd +++ b/spark-class2.cmd @@ -65,10 +65,17 @@ if "%FOUND_JAR%"=="0" ( ) :skip_build_test +set TOOLS_DIR=%FWDIR%tools +set SPARK_TOOLS_JAR= +for %%d in ("%TOOLS_DIR%\target\scala-%SCALA_VERSION%\spark-tools*assembly*.jar") do ( + set SPARK_TOOLS_JAR=%%d +) + rem Compute classpath using external script set DONT_PRINT_CLASSPATH=1 call "%FWDIR%bin\compute-classpath.cmd" set DONT_PRINT_CLASSPATH=0 +set CLASSPATH=%SPARK_TOOLS_JAR%;%CLASSPATH% rem Figure out where java is. set RUNNER=java
