Refactor SparkSubmitOperator resumable job tracking backends#68543
Open
onlyarnav wants to merge 1 commit into
Open
Refactor SparkSubmitOperator resumable job tracking backends#68543onlyarnav wants to merge 1 commit into
onlyarnav wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decouples the three resumable deployment backends (Spark standalone driver-status tracking, YARN cluster mode, and Kubernetes driver-pod tracking) in
SparkSubmitOperator.Problem
Previously, each method in the
ResumableJobMixinimplementation ofSparkSubmitOperator(submit_job,get_job_status,is_job_active,is_job_succeeded,poll_until_complete,on_kill) branched inline on the active deployment backend. This spread backend-specific logic across multiple methods, making the codebase hard to follow and difficult to extend.Solution
SparkSubmitResumableBackendacts as the abstract base class/interface.YarnSparkSubmitBackend,KubernetesSparkSubmitBackend, andStandaloneSparkSubmitBackendencapsulate backend-specific logic._resumable_backendproperty inSparkSubmitOperatorto resolve the backend selection exactly once (lazily on first access).SparkSubmitOperatordirectly to the active strategy backend, keeping the operator clean.closes: #68505
Was generative AI tooling used to co-author this PR?