[SPARK-56670][K8S] Restrict ExecutorResizePlugin to direct pods allocator#55615
Closed
dongjoon-hyun wants to merge 1 commit into
Closed
[SPARK-56670][K8S] Restrict ExecutorResizePlugin to direct pods allocator#55615dongjoon-hyun wants to merge 1 commit into
ExecutorResizePlugin to direct pods allocator#55615dongjoon-hyun wants to merge 1 commit into
Conversation
Member
Author
|
All tests passed. |
Member
Author
|
Could you review this PR, @HyukjinKwon ? |
HyukjinKwon
approved these changes
Apr 30, 2026
Member
Author
|
Thank you, @HyukjinKwon ~ Merged to master for Apache Spark 4.2.0. |
dongjoon-hyun
added a commit
that referenced
this pull request
May 1, 2026
…s allocator ### What changes were proposed in this pull request? This PR restricts `ExecutorPVCResizePlugin` to the `direct` pods allocator. When `spark.kubernetes.allocation.pods.allocator` is not `direct`, `init()` logs a warning and returns early. ### Why are the changes needed? `ExecutorPVCResizePlugin` patches individual executor PVCs directly. This only works when Spark owns each pod and its PVCs (`direct` allocator). For `statefulset` and `deployment` allocators, PVCs are governed by the controller's `volumeClaimTemplates`, so direct patches conflict with the controller. This mirrors SPARK-56670, which restricted the sibling `ExecutorResizePlugin` for the same reason. - #55615 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs with new unit tests. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7) Closes #55652 from dongjoon-hyun/SPARK-56702. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
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.
What changes were proposed in this pull request?
This PR restricts
ExecutorResizePluginto activate only when thedirectpods allocator (ExecutorPodsAllocator) is configured viaspark.kubernetes.allocation.pods.allocator.When the configured allocator is anything else (
statefulset,deployment, or a user-supplied class),ExecutorResizeDriverPlugin.init()now logs a warning and returns early without creating a Kubernetes client orscheduling the periodic memory check.
Why are the changes needed?
ExecutorResizePluginresizes individual executor pods in place viapods().withName(...).subresource("resize").patch(...). This works correctly only when Spark itself owns each pod, i.e. with thedirectallocator. For the other allocators, user-defined or the higher-level controller's pod template is the source of truth and patching a single pod under those allocators may have unexpected side-effects.statefulset→StatefulSet.spec.templatedeployment→Deployment.spec.templateDoes this PR introduce any user-facing change?
No,
ExecutorResizePluginis a new unreleased feature of Apache Spark 4.2.0.How was this patch tested?
Pass the CIs with the newly added test coverage.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)