Skip to content

Commit cb059b0

Browse files
committed
Code review
1 parent 0476e5e commit cb059b0

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

bin/compute-classpath.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
# This script computes Spark's classpath and prints it to stdout; it's used by both the "run"
2121
# script and the ExecutorRunner in standalone cluster mode.
2222

23-
SCALA_VERSION=${SCALA_VERSION:-"2.10"}
24-
2523
# Figure out where Spark is installed
2624
FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
2725

@@ -36,6 +34,18 @@ else
3634
CLASSPATH="$CLASSPATH:$FWDIR/conf"
3735
fi
3836

37+
if [ -z "$SCALA_VERSION" ]; then
38+
39+
ASSEMBLY_DIR2="$FWDIR/assembly/target/scala-2.11"
40+
# if scala-2.11 directory for assembly exists, we use that. Otherwise we default to
41+
# scala 2.10.
42+
if [ -d "$ASSEMBLY_DIR2" ]; then
43+
SCALA_VERSION="2.11"
44+
else
45+
SCALA_VERSION="2.10"
46+
fi
47+
fi
48+
3949
ASSEMBLY_DIR="$FWDIR/assembly/target/scala-$SCALA_VERSION"
4050

4151
if [ -n "$JAVA_HOME" ]; then

conf/spark-env.sh.template

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
# This file is sourced when running various Spark programs.
44
# Copy it as spark-env.sh and edit that to configure Spark for your site.
55

6-
# Uncomment this if you plan to use scala 2.11
7-
# SCALA_VERSION=2.11
8-
96
# Options read when launching programs locally with
107
# ./bin/run-example or ./bin/spark-submit
118
# - HADOOP_CONF_DIR, to point Spark towards Hadoop configuration files

core/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,6 @@
296296
<artifactId>easymockclassextension</artifactId>
297297
<scope>test</scope>
298298
</dependency>
299-
<dependency>
300-
<groupId>com.twitter</groupId>
301-
<artifactId>chill-java</artifactId>
302-
</dependency>
303299
<dependency>
304300
<groupId>asm</groupId>
305301
<artifactId>asm</artifactId>

examples/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@
282282
</dependencies>
283283
</profile>
284284
<profile>
285+
<!-- We add source directories specific to Scala 2.10 and 2.11 since some examples
286+
work only in one and not the other -->
285287
<id>scala-2.10</id>
286288
<activation>
287289
<activeByDefault>true</activeByDefault>

project/SparkBuild.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ object SparkBuild extends PomBuild {
100100
"conjunction with environment variable.")
101101
v.split("(\\s+|,)").filterNot(_.isEmpty).map(_.trim.replaceAll("-P", "")).toSeq
102102
}
103-
if(profiles.exists(_.contains("scala"))) {
103+
if(profiles.exists(_.contains("scala-"))) {
104104
profiles
105105
} else {
106106
println("Enabled default scala profile")

0 commit comments

Comments
 (0)