Skip to content

Commit

Permalink
Hardcode Scala Version
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?
This is a patch to get around the fact that we have a different deployment mode from upstream Spark. Patch initially authored by marmbrus.

Author: Michael Armbrust <michael@databricks.com>

Closes apache#42 from rxin/rxin-hardcode-scala-version.
  • Loading branch information
marmbrus authored and yhuai committed Aug 9, 2016
1 parent ace0902 commit 8afe345
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,18 +228,8 @@ String getScalaVersion() {
String scala = getenv("SPARK_SCALA_VERSION");
if (scala != null) {
return scala;
}
String sparkHome = getSparkHome();
File scala210 = new File(sparkHome, "launcher/target/scala-2.10");
File scala211 = new File(sparkHome, "launcher/target/scala-2.11");
checkState(!scala210.isDirectory() || !scala211.isDirectory(),
"Presence of build for both scala versions (2.10 and 2.11) detected.\n" +
"Either clean one of them or set SPARK_SCALA_VERSION in your environment.");
if (scala210.isDirectory()) {
return "2.10";
} else {
checkState(scala211.isDirectory(), "Cannot find any build directories.");
return "2.11";
return "2.10";
}
}

Expand Down

0 comments on commit 8afe345

Please sign in to comment.