Code review
Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/1b836d80 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/1b836d80 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/1b836d80 Branch: refs/heads/scala-2.11-prashant Commit: 1b836d80a0d429a1518da41c034f2a511a6545a2 Parents: 4af9de7 Author: Prashant Sharma <prashan...@imaginea.com> Authored: Fri Oct 24 09:47:48 2014 +0530 Committer: Prashant Sharma <prashan...@imaginea.com> Committed: Fri Nov 7 11:22:47 2014 +0530 ---------------------------------------------------------------------- bin/compute-classpath.sh | 14 ++++++++++++-- conf/spark-env.sh.template | 3 --- core/pom.xml | 4 ---- examples/pom.xml | 2 ++ project/SparkBuild.scala | 2 +- 5 files changed, 15 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/1b836d80/bin/compute-classpath.sh ---------------------------------------------------------------------- diff --git a/bin/compute-classpath.sh b/bin/compute-classpath.sh index 993d260..86dd4b2 100755 --- a/bin/compute-classpath.sh +++ b/bin/compute-classpath.sh @@ -20,8 +20,6 @@ # This script computes Spark's classpath and prints it to stdout; it's used by both the "run" # script and the ExecutorRunner in standalone cluster mode. -SCALA_VERSION=${SCALA_VERSION:-"2.10"} - # Figure out where Spark is installed FWDIR="$(cd "`dirname "$0"`"/..; pwd)" @@ -36,6 +34,18 @@ else CLASSPATH="$CLASSPATH:$FWDIR/conf" fi +if [ -z "$SCALA_VERSION" ]; then + + ASSEMBLY_DIR2="$FWDIR/assembly/target/scala-2.11" + # if scala-2.11 directory for assembly exists, we use that. Otherwise we default to + # scala 2.10. + if [ -d "$ASSEMBLY_DIR2" ]; then + SCALA_VERSION="2.11" + else + SCALA_VERSION="2.10" + fi +fi + ASSEMBLY_DIR="$FWDIR/assembly/target/scala-$SCALA_VERSION" if [ -n "$JAVA_HOME" ]; then http://git-wip-us.apache.org/repos/asf/spark/blob/1b836d80/conf/spark-env.sh.template ---------------------------------------------------------------------- diff --git a/conf/spark-env.sh.template b/conf/spark-env.sh.template index 6a5622e..f8ffbf6 100755 --- a/conf/spark-env.sh.template +++ b/conf/spark-env.sh.template @@ -3,9 +3,6 @@ # This file is sourced when running various Spark programs. # Copy it as spark-env.sh and edit that to configure Spark for your site. -# Uncomment this if you plan to use scala 2.11 -# SCALA_VERSION=2.11 - # Options read when launching programs locally with # ./bin/run-example or ./bin/spark-submit # - HADOOP_CONF_DIR, to point Spark towards Hadoop configuration files http://git-wip-us.apache.org/repos/asf/spark/blob/1b836d80/core/pom.xml ---------------------------------------------------------------------- diff --git a/core/pom.xml b/core/pom.xml index 624aa96..afa8c8c 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -297,10 +297,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>com.twitter</groupId> - <artifactId>chill-java</artifactId> - </dependency> - <dependency> <groupId>asm</groupId> <artifactId>asm</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/spark/blob/1b836d80/examples/pom.xml ---------------------------------------------------------------------- diff --git a/examples/pom.xml b/examples/pom.xml index e80c637..0cc15e5 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -282,6 +282,8 @@ </dependencies> </profile> <profile> + <!-- We add source directories specific to Scala 2.10 and 2.11 since some examples + work only in one and not the other --> <id>scala-2.10</id> <activation> <activeByDefault>true</activeByDefault> http://git-wip-us.apache.org/repos/asf/spark/blob/1b836d80/project/SparkBuild.scala ---------------------------------------------------------------------- diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 349cc27..0d8adcb 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -100,7 +100,7 @@ object SparkBuild extends PomBuild { "conjunction with environment variable.") v.split("(\\s+|,)").filterNot(_.isEmpty).map(_.trim.replaceAll("-P", "")).toSeq } - if(profiles.exists(_.contains("scala"))) { + if(profiles.exists(_.contains("scala-"))) { profiles } else { println("Enabled default scala profile") --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org