LuciferYang opened a new pull request, #2772:
URL: https://github.com/apache/uniffle/pull/2772

   ### What changes were proposed in this pull request?
   
   Add a mutually-exclusive `spark4.2` Maven profile that builds the existing 
`client-spark/spark4` module against **Apache Spark 4.2.0**, mirroring the 
`spark4.1` profile added in #2751.
   
   - **Root `pom.xml`**: new `spark4.2` profile — a structural clone of 
`spark4.1`, differing only in `spark.version=4.2.0`, `scala.version=2.13.18`, 
`netty.version=4.2.13.Final`, `jackson.version=2.21.2`.
   - **`client-spark/spark4/pom.xml`**: `spark4.2` profile reuses the 
`src/main/java-spark4_1` compat source root (the 4.1 `Spark4Compat` shim).
   - **`client-spark/extension/pom.xml`**: `spark4.2` profile reuses the 
`scala-jakarta` servlet source root.
   - **lz4**: introduce a `${lz4.groupId}` property (`org.lz4` by default, 
`at.yawk.lz4` under `spark4.2`); the two integration-test modules declare 
`${lz4.groupId}:lz4-java`, and both coordinates are version-managed in root 
`dependencyManagement` (`org.lz4:1.8.1`, `at.yawk.lz4:1.11.0`).
   - **CI**: `parallel.yml` gains a `spark4.2 / java 17` matrix entry; 
`sequential.yml` gains a `-Pspark4.2` step gated on `java-version == 17`.
   
   No new Java source and no new Maven module. `client-spark/spark4-shaded` 
needs no change (its bouncycastle/jctools relocations are already global).
   
   ### Why are the changes needed?
   
   Fix: #2771
   
   Users should be able to build and run Uniffle's Spark client against Spark 
4.2.0 with full parity to the existing 4.1 support.
   
   The three cross-major APIs called from `client-spark/spark4` are 
**byte-identical** between 4.1.1 and 4.2.0 (verified with `javap`), so no shim 
change is required:
   
   | API | 4.1.1 | 4.2.0 |
   |---|---|---|
   | `MapStatus.apply(BlockManagerId, long[], long, long)` | 4-arg | identical |
   | `ExternalSorter(…, RowBasedChecksum[])` ctor | 6-arg | identical |
   | `WebUIPage.render(jakarta…HttpServletRequest)` | jakarta | identical |
   
   Dependency notes:
   - **jackson → 2.21.2 (required):** Spark 4.2.0 ships 
`jackson-module-scala_2.13` 2.21.2, which validates the classpath 
`jackson-databind` on registration and throws in `RDDOperationScope`'s static 
initializer if it is outside `[2.21.0, 2.22.0)`. Same class of failure the 4.1 
work hit.
   - **netty → 4.2.13.Final:** matches what Spark 4.2.0 was compiled/tested 
against (still Netty 4.2, same major as 4.1's 4.2.7, so #2751's 
`NioIoHandler`/refCnt handling still applies — no code change).
   - **lz4 → at.yawk.lz4:1.11.0 (required):** Spark 4.2.0 bumped lz4 to 1.11.0, 
and the lz4-java project relocated its coordinates from `org.lz4` to 
`at.yawk.lz4` after 1.8.1 (`org.lz4` only publishes a 1.8.1 relocation stub). 
Spark 4.2's shuffle path calls `LZ4BlockInputStream.newBuilder()` (added in the 
1.11 line); without the bump the integration tests fail at runtime with 
`NoSuchMethodError`. A managed `at.yawk.lz4:1.11.0` alone does **not** win 
because the modules declare `org.lz4` and Maven's relocation carries 1.8.1's 
version — hence the `${lz4.groupId}` flip.
   - hadoop / jetty / log4j / slf4j / commons-lang3 deltas are deferred; the 
profile keeps the 4.1 values.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No behavioral change. Adds a new opt-in `-Pspark4.2` build profile. Existing 
`-Pspark4` (4.0.2) and `-Pspark4.1` (4.1.1) are unchanged.
   
   ### How was this patch tested?
   
   Verified locally on JDK 17 (Zulu 17.0.18):
   
   1. `mvn clean install -Pspark4.2 -DskipTests` — compiles + shades against 
4.2.0 (spark-core/sql/catalyst 4.2.0, scala 2.13.18, netty 4.2.13.Final, 
jackson 2.21.2, lz4 1.11.0 resolved).
   2. `mvn clean install -Pspark4.1 -DskipTests` + integration tests — 4.1.1 
build and `AQERepartitionTest` / `MapSideCombineTest` still green (lz4 stays 
`org.lz4:1.8.1`); confirms no regression.
   3. `AQERepartitionTest`, `MapSideCombineTest` pass under `-Pspark4.2`.
   4. `TransportFrameDecoderTest` (2 tests) passes on Netty 4.2.13 under 
`-Pspark4.2`.
   5. `RepartitionWithLocalFileRssTest` (NOOP/ZSTD/**LZ4** codecs) passes under 
`-Pspark4.2` — exercises the lz4 runtime path.
   6. `dev/scripts/checkshade.sh` on the spark4.2 shaded jar — "check success", 
0 unshaded classes; bouncycastle/jctools relocated.
   
   CI runs the same via the new `spark4.2` matrix entry / `-Pspark4.2` step.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to