File tree Expand file tree Collapse file tree 5 files changed +15
-10
lines changed Expand file tree Collapse file tree 5 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 20
20
# This script computes Spark's classpath and prints it to stdout; it's used by both the "run"
21
21
# script and the ExecutorRunner in standalone cluster mode.
22
22
23
- SCALA_VERSION=${SCALA_VERSION:- " 2.10" }
24
-
25
23
# Figure out where Spark is installed
26
24
FWDIR=" $( cd " ` dirname " $0 " ` " /..; pwd) "
27
25
36
34
CLASSPATH=" $CLASSPATH :$FWDIR /conf"
37
35
fi
38
36
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
+
39
49
ASSEMBLY_DIR=" $FWDIR /assembly/target/scala-$SCALA_VERSION "
40
50
41
51
if [ -n " $JAVA_HOME " ]; then
Original file line number Diff line number Diff line change 3
3
# This file is sourced when running various Spark programs.
4
4
# Copy it as spark-env.sh and edit that to configure Spark for your site.
5
5
6
- # Uncomment this if you plan to use scala 2.11
7
- # SCALA_VERSION=2.11
8
-
9
6
# Options read when launching programs locally with
10
7
# ./bin/run-example or ./bin/spark-submit
11
8
# - HADOOP_CONF_DIR, to point Spark towards Hadoop configuration files
Original file line number Diff line number Diff line change 296
296
<artifactId >easymockclassextension</artifactId >
297
297
<scope >test</scope >
298
298
</dependency >
299
- <dependency >
300
- <groupId >com.twitter</groupId >
301
- <artifactId >chill-java</artifactId >
302
- </dependency >
303
299
<dependency >
304
300
<groupId >asm</groupId >
305
301
<artifactId >asm</artifactId >
Original file line number Diff line number Diff line change 282
282
</dependencies >
283
283
</profile >
284
284
<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 -->
285
287
<id >scala-2.10</id >
286
288
<activation >
287
289
<activeByDefault >true</activeByDefault >
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ object SparkBuild extends PomBuild {
100
100
" conjunction with environment variable." )
101
101
v.split(" (\\ s+|,)" ).filterNot(_.isEmpty).map(_.trim.replaceAll(" -P" , " " )).toSeq
102
102
}
103
- if (profiles.exists(_.contains(" scala" ))) {
103
+ if (profiles.exists(_.contains(" scala- " ))) {
104
104
profiles
105
105
} else {
106
106
println(" Enabled default scala profile" )
You can’t perform that action at this time.
0 commit comments