[#1805] feat(spark): Support Spark 4 in client-spark/extension#2749
Open
LuciferYang wants to merge 1 commit into
Open
[#1805] feat(spark): Support Spark 4 in client-spark/extension#2749LuciferYang wants to merge 1 commit into
LuciferYang wants to merge 1 commit into
Conversation
Spark 4 switched the UI servlet API from javax.servlet (Jetty 9) to
jakarta.servlet (Jetty 11+). WebUIPage.render must override its parent
signature exactly, so the same .scala file cannot serve both.
Route extension through a ServletCompat type alias backed by two
version-specific source roots (scala-javax / scala-jakarta). The
build-helper-maven-plugin picks one via ${extension.servlet.source.dir},
switched by a spark4 profile in this module's pom that merges with the
root pom's spark4 profile.
Other changes:
- Add client-spark/extension to the root pom's spark4 profile modules.
- Add rss-client-spark-ui dependency to client-spark/spark4/pom.xml,
mirroring client-spark/spark3/pom.xml.
- Bump build-helper-maven-plugin 1.10 -> 3.6.0.
- Contributor notes document new-variant and new-spark-version steps,
IDE re-import on profile switch, and ~/.m2 hygiene.
Verified: extension compiles cleanly under spark3 / spark3.0 / spark3.2 /
spark3.2.0 / spark3.3 / spark3.4 / spark3.5 / spark4 profiles.
aedf48a to
46a7143
Compare
Contributor
Author
|
cc @roryqi |
Contributor
|
@zuston Could u take a look? |
Member
|
Great work! Have you tested the uniffle shuffle tab in spark4 history server or runtime? @LuciferYang |
Contributor
Author
zuston
approved these changes
May 14, 2026
Contributor
Author
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?
Follow-up to #2748. That PR left
client-spark/extensionout of thespark4profile because Spark 4 usesjakarta.servletwhile Spark 3 usesjavax.servlet, andWebUIPage.render(request)must override its parent signature exactly — so one.scalafile can't serve both.This PR adds two sibling source roots under
client-spark/extension:src/main/scala-javax/org/apache/spark/ui/ServletCompat.scala—type HttpServletRequest = javax.servlet.http.HttpServletRequestsrc/main/scala-jakarta/org/apache/spark/ui/ServletCompat.scala—type HttpServletRequest = jakarta.servlet.http.HttpServletRequestShufflePage.scalaimportsServletCompat.HttpServletRequestand overridesrenderwith that alias.build-helper-maven-pluginpicks one of the two roots via${extension.servlet.source.dir}; aspark4profile in this module's pom (merged with the root pom'sspark4profile by shared id) flips the property to the jakarta variant.ServletCompatisprivate[ui], so callers stay inorg.apache.spark.ui.Alongside:
client-spark/extensionto the root pom'sspark4profile<modules>.rss-client-spark-uidependency inclient-spark/spark4/pom.xml(mirrorsclient-spark/spark3/pom.xml).build-helper-maven-pluginfrom 1.10 (2014) to 3.6.0.Why are the changes needed?
Without this, Spark 4 users lose the Uniffle Shuffle tab, the History Server plugin, and the listener-driven status store. #2748 flagged this as a known limitation.
How was this patch tested?
mvn -pl client-spark/extension clean compilepasses under every profile that includes the module:spark3,spark3.0,spark3.2,spark3.2.0,spark3.3,spark3.4,spark3.5,spark4.Under
-Pspark4,dependency:treeresolvesspark-core_2.13:4.0.2,scala-library:2.13.16, andjakarta.servlet-api:5.0.0. Runtime validation on a live Spark 4 cluster is follow-up.