[SPARK-57844] Exclude Hadoop YARN classes from shadow jar#727
Closed
dongjoon-hyun wants to merge 1 commit into
Closed
[SPARK-57844] Exclude Hadoop YARN classes from shadow jar#727dongjoon-hyun wants to merge 1 commit into
dongjoon-hyun wants to merge 1 commit into
Conversation
peter-toth
approved these changes
Jul 1, 2026
Member
Author
|
Thank you, @peter-toth . I'm revisiting this area while clarifying the licenses. |
viirya
approved these changes
Jul 1, 2026
Member
Author
|
Thank you, @viirya ! |
Member
Author
|
Merged to main |
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 excludes Hadoop YARN classes (
org/apache/hadoop/yarn/**) from the operator shadow jar by adding a class-path filter to theshadowJarblock inspark-operator/build.gradle.Note that the individual
org.apache.hadoop:hadoop-yarn-api,hadoop-yarn-client, andhadoop-yarn-commonartifacts are not present in the dependency graph. Spark'sspark-core/spark-kubernetespull in the shadedhadoop-client-apiuber-jar, which bundles the YARN classes internally. Therefore these classes are filtered at packaging time rather than excluded as Maven modules. This follows the existing precedent of excluding Hadoopwebapps/**(HDFS/YARN UI).Why are the changes needed?
The operator manages Spark applications on Kubernetes and never uses YARN. The bundled YARN classes are dead weight in the runtime classpath and shaded jar. Removing them drops 2,766 classes (~20 MB uncompressed) that originate from
hadoop-client-api.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass the CIs.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.8