Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MockTaskContext to support new functions added in Spark-4.0 [databricks] #11972

Merged
merged 7 commits into from
Jan 17, 2025

Conversation

nartal1
Copy link
Collaborator

@nartal1 nartal1 commented Jan 16, 2025

This fixes #11971 . This unblocks the scala_2.13 nightly build jobs.

MockTaskContext extends TaskContext in spark-rapids code. Recently additional definitions were added in Spark-4.0's TaskContext.
In this PR, we added the missing methods to MockTaskContext.scala file. We are not overriding these methods so that it can compile on all Spark versions.

In Spark-4.0, these were added in TaskContext.scala:
PR : apache/spark#49413

private[spark] def interruptible(): Boolean
private[spark] def pendingInterrupt(threadToInterrupt: Option[Thread], reason: String): Unit
private[spark] def createResourceUninterruptibly[T <: Closeable](resourceBuilder: => T): T

Signed-off-by: Niranjan Artal <[email protected]>
@nartal1 nartal1 added bug Something isn't working Spark 4.0+ Spark 4.0+ issues labels Jan 16, 2025
@nartal1 nartal1 self-assigned this Jan 16, 2025
@nartal1
Copy link
Collaborator Author

nartal1 commented Jan 16, 2025

build

@nartal1
Copy link
Collaborator Author

nartal1 commented Jan 16, 2025

Looks like the Spark-4 build here doesn't contain the Spark commit which was merged. The nightly build was using URM_URL.

[INFO] Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/spark/spark-sql_2.13/4.0.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from snapshots-repo: https://oss.sonatype.org/content/repositories/snapshots/org/apache/spark/spark-sql_2.13/4.0.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloading from apache-snapshots-repo: https://repository.apache.org/content/repositories/snapshots/org/apache/spark/spark-sql_2.13/4.0.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded from apache-snapshots-repo: https://repository.apache.org/content/repositories/snapshots/org/apache/spark/spark-sql_2.13/4.0.0-SNAPSHOT/maven-metadata.xml (2.1 kB at 8.5 kB/s)
[INFO] Downloaded from apache.snapshots: https://repository.apache.org/snapshots/org/apache/spark/spark-sql_2.13/4.0.0-SNAPSHOT/maven-metadata.xml (2.1 kB at 8.4 kB/s)
[INFO] Downloading from snapshots-repo: https://oss.sonatype.org/content/repositories/snapshots/org/apache/spark/spark-sql_2.13/4.0.0-SNAPSHOT/spark-sql_2.13-4.0.0-20250115.001748-498.pom
[INFO] Downloading from apache-snapshots-repo: https://repository.apache.org/content/repositories/snapshots/org/apache/spark/spark-sql_2.13/4.0.0-SNAPSHOT/spark-sql_2.13-4.0.0-20250115.001748-498.pom

@nartal1 nartal1 changed the title Move MockTaskContext to shim to support new functions added in Spark-4.0 [databricks] Update MockTaskContext to support new functions added in Spark-4.0 [databricks] Jan 17, 2025
@nartal1
Copy link
Collaborator Author

nartal1 commented Jan 17, 2025

build

gerashegalov
gerashegalov previously approved these changes Jan 17, 2025
docs/dev/shims.md Outdated Show resolved Hide resolved
Co-authored-by: Gera Shegalov <[email protected]>
@nartal1
Copy link
Collaborator Author

nartal1 commented Jan 17, 2025

build

@nartal1 nartal1 merged commit 1ba64a8 into NVIDIA:branch-25.02 Jan 17, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Spark 4.0+ Spark 4.0+ issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] scala213 nightly build failed rapids-4-spark-tests_2.13 of spark400
2 participants