You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2026/03/30 07:25:52 UTC

(spark-kubernetes-operator) branch main updated: [SPARK-56283] Exclude HDFS/YARN UI resources

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new d83861e  [SPARK-56283] Exclude HDFS/YARN UI resources
d83861e is described below

commit d83861ed0726d2589d0bad6c24595a1ba1762cab
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Mon Mar 30 00:25:46 2026 -0700

    [SPARK-56283] Exclude HDFS/YARN UI resources
    
    ### What changes were proposed in this pull request?
    
    This PR excludes Hadoop HDFS/YARN UI web application resources (`webapps/**`) from the `shadowJar` output.
    
    ### Why are the changes needed?
    
    The Apache Spark Kubernetes Operator does not use Hadoop's HDFS or YARN web UIs. Excluding these resources reduces the fat JAR size and removes unnecessary files, similar to the existing exclusion of `org/apache/spark/ui/static/**`.
    
    ```
    $ jar tvf spark-operator/build/libs/spark-kubernetes-operator-0.9.0-SNAPSHOT-all.jar | sort | grep webapps | tail -n5
     67928 Fri Feb 01 00:00:00 PST 1980 webapps/static/jquery/jquery-ui-1.13.2.custom.min.js.gz
     88048 Fri Feb 01 00:00:00 PST 1980 webapps/static/dt-1.11.5/js/jquery.dataTables.min.js
     89500 Fri Feb 01 00:00:00 PST 1980 webapps/static/jquery/jquery-3.6.0.min.js
    199936 Fri Feb 01 00:00:00 PST 1980 webapps/static/jt/jquery.jstree.js
    255084 Fri Feb 01 00:00:00 PST 1980 webapps/static/jquery/jquery-ui-1.13.2.custom.min.js
    ```
    
    **After this PR**
    
    ```diff
    $ ls -al spark-operator/build/libs/spark-kubernetes-operator-0.9.0-SNAPSHOT-all.jar
    --rw-r--r-- 1 dongjoon  staff  136446076 Mar 30 00:03 spark-operator/build/libs/spark-kubernetes-operator-0.9.0-SNAPSHOT-all.jar
    +-rw-r--r-- 1 dongjoon  staff  135995304 Mar 30 00:05 spark-operator/build/libs/spark-kubernetes-operator-0.9.0-SNAPSHOT-all.jar
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the CIs and manually build with `gradle shadowJar` and verified the output no longer contains `webapps/` entries.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Code (Claude Opus 4.6)
    
    Closes #602 from dongjoon-hyun/SPARK-56283.
    
    Authored-by: Dongjoon Hyun <do...@apache.org>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 spark-operator/build.gradle | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/spark-operator/build.gradle b/spark-operator/build.gradle
index baf32fb..f7b4672 100644
--- a/spark-operator/build.gradle
+++ b/spark-operator/build.gradle
@@ -108,6 +108,8 @@ shadowJar {
   mergeServiceFiles()
   transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer)
   exclude("org/apache/spark/ui/static/**")
+  // Hadoop webapps (HDFS/YARN UI)
+  exclude("webapps/**")
   // Netty QUIC native libraries - not needed for K8s API server communication (HTTP/1.1 & HTTP/2)
   exclude("META-INF/native/libnetty_quiche*")
   exclude("META-INF/native/netty_quiche*")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org