Skip to content

Conversation

@sarutak
Copy link
Member

@sarutak sarutak commented Oct 2, 2020

What changes were proposed in this pull request?

This PR fixes SparkBuild.scala to recognize build settings for Scala 2.13.
In SparkBuild.scala, a variable scalaBinaryVersion is hardcoded as 2.12.
So, an environment variable SPARK_SCALA_VERSION is also to be 2.12.
This issue causes some test suites (e.g. SparkSubmitSuite) to be error.

===== TEST OUTPUT FOR o.a.s.deploy.SparkSubmitSuite: 'user classpath first in driver' =====

20/10/02 08:55:30.234 redirect stderr for command /home/kou/work/oss/spark-scala-2.13/bin/spark-submit INFO Utils: Error: Could not find or load m
ain class org.apache.spark.launcher.Main
20/10/02 08:55:30.235 redirect stderr for command /home/kou/work/oss/spark-scala-2.13/bin/spark-submit INFO Utils: /home/kou/work/oss/spark-scala-
2.13/bin/spark-class: line 96: CMD: bad array subscript

The reason of this error is that environment variables SPARK_JARS_DIR and LAUNCH_CLASSPATH is defined in bin/spark-class as follows.

SPARK_JARS_DIR="${SPARK_HOME}/assembly/target/scala-$SPARK_SCALA_VERSION/jars"
LAUNCH_CLASSPATH="${SPARK_HOME}/launcher/target/scala-$SPARK_SCALA_VERSION/classes:$LAUNCH_CLASSPATH"

Why are the changes needed?

To build for Scala 2.13 successfully.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Tests for core module finish successfully.

build/sbt -Pscala-2.13 clean "core/test"

@SparkQA
Copy link

SparkQA commented Oct 2, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33937/

@SparkQA
Copy link

SparkQA commented Oct 2, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33937/

@sarutak
Copy link
Member Author

sarutak commented Oct 2, 2020

retest this please.

@SparkQA
Copy link

SparkQA commented Oct 2, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33943/

@SparkQA
Copy link

SparkQA commented Oct 2, 2020

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/33943/

@SparkQA
Copy link

SparkQA commented Oct 2, 2020

Test build #129324 has finished for PR 29927 at commit 833c2dd.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Oct 2, 2020

Test build #129332 has finished for PR 29927 at commit 833c2dd.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

cc @srowen FYI

@HyukjinKwon
Copy link
Member

Merged to master.

@srowen
Copy link
Member

srowen commented Oct 2, 2020

Yep good call here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants