Skip to content

[SPARK-57844] Exclude Hadoop YARN classes from shadow jar#727

Closed
dongjoon-hyun wants to merge 1 commit into
apache:mainfrom
dongjoon-hyun:SPARK-57844
Closed

[SPARK-57844] Exclude Hadoop YARN classes from shadow jar#727
dongjoon-hyun wants to merge 1 commit into
apache:mainfrom
dongjoon-hyun:SPARK-57844

Conversation

@dongjoon-hyun

@dongjoon-hyun dongjoon-hyun commented Jul 1, 2026

Copy link
Copy Markdown
Member

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 the shadowJar block in spark-operator/build.gradle.

Note that the individual org.apache.hadoop:hadoop-yarn-api, hadoop-yarn-client, and hadoop-yarn-common artifacts are not present in the dependency graph. Spark's spark-core / spark-kubernetes pull in the shaded hadoop-client-api uber-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 Hadoop webapps/** (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

@dongjoon-hyun

Copy link
Copy Markdown
Member Author

Thank you, @peter-toth . I'm revisiting this area while clarifying the licenses.

@dongjoon-hyun

Copy link
Copy Markdown
Member Author

Thank you, @viirya !

@dongjoon-hyun dongjoon-hyun added this to the 1.0.0 milestone Jul 1, 2026
@dongjoon-hyun

Copy link
Copy Markdown
Member Author

Merged to main

@dongjoon-hyun dongjoon-hyun deleted the SPARK-57844 branch July 1, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants