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

Shim MockTaskContext to fix Spark 3.5.1 build #10096

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

jlowe
Copy link
Member

@jlowe jlowe commented Dec 26, 2023

Fixes #10094. Spark 3.5.1 incorporates SPARK-46480 which adds a new isFailed method to the abstract TaskContext class. A new MockTaskContextBase shim is used to override this new method on Spark 3.5.1.

Signed-off-by: Jason Lowe <jlowe@nvidia.com>
@jlowe jlowe added test Only impacts tests build Related to CI / CD or cleanly building labels Dec 26, 2023
@jlowe jlowe self-assigned this Dec 26, 2023
@jlowe
Copy link
Member Author

jlowe commented Dec 26, 2023

build

@jlowe jlowe merged commit bc79bcf into NVIDIA:branch-24.02 Dec 26, 2023
40 checks passed
@jlowe jlowe deleted the fix-build branch December 26, 2023 19:26
@@ -29,7 +29,7 @@ import org.apache.spark.scheduler.TaskLocality
import org.apache.spark.shuffle.FetchFailedException
import org.apache.spark.util.{AccumulatorV2, TaskCompletionListener, TaskFailureListener}

class MockTaskContext(taskAttemptId: Long, partitionId: Int) extends TaskContext {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there is just a new method that has not been used previously, we do not really have to fork the implementation into two shims as long as we do not insist on using the override keyword.

class MockTaskContext(taskAttemptId: Long, partitionId: Int) extends TaskContext {
   def isFailed(): Boolean = false
}

razajafri added a commit to razajafri/spark-rapids that referenced this pull request Dec 28, 2023
gerashegalov pushed a commit that referenced this pull request Dec 29, 2023
…ala [databricks] (#10106)

* Revert "Shim MockTaskContext to fix Spark 3.5.1 build (#10096)"

This reverts commit bc79bcf.

* Added isFailed to MockTaskContext

* Signing off

Signed-off-by: Raza Jafri <rjafri@nvidia.com>

---------

Signed-off-by: Raza Jafri <rjafri@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to CI / CD or cleanly building test Only impacts tests
Projects
None yet
4 participants