voonhous opened a new pull request, #20906:
URL: https://github.com/apache/hudi/pull/20906

   ### Describe the issue this Pull Request addresses
   
   Depends on #20903 (the 485-SNAPSHOT pin); this branch carries its commit 
until that merges, and only the last commit belongs to this PR.
   
   The trino-hudi plugin directory assembled from `docker/trino/shim` ships two 
copies of the same classes, so which copy Trino loads depends on jar order in 
the plugin class loader:
   
   - `com.google.inject:guice:classes:7.0.0` (plus 
`aopalliance:aopalliance:1.0`) next to `io.airlift:guice:10`, which 
`io.airlift:bootstrap` brings and which Trino's own code is built against.
   - `org.lz4:lz4-java:1.8.0` from `hudi-common` next to 
`at.yawk.lz4:lz4-java:1.14.1` from `trino-hive-formats`, both carrying 
`net.jpountz.lz4`.
   
   Maven keeps both of each pair because the coordinates differ. The upstream 
shim in trinodb/trino#30682 keeps them out with exclusions; ours had none, and 
the shim sets `air.check.skip-all`, which also turns off the duplicate-class 
check that would have caught it.
   
   ### Summary and Changelog
   
   - `hudi-trino/pom.xml`: declare `io.airlift:guice` instead of 
`com.google.inject:guice:classes`. The stock declaration was carried over from 
Trino's plugin pom in #18837; Trino moved to `io.airlift:guice` in 
trinodb/trino fc0834cad5c4 (Trino 484). It was the only path for stock guice 
and aopalliance into hudi-trino, so no exclusion is needed for them.
   - `docker/trino/shim/pom.xml`: exclude `org.lz4:lz4-java` from `hudi-trino`, 
as the upstream shim does. `hudi-common`'s `HashID` keeps working on the 
`at.yawk.lz4` fork, which ships the same classes.
   
   Plugin directory built from the shim, before and after (313 to 310 jars):
   
   ```
   < aopalliance_aopalliance-1.0.jar
   < com.google.inject_guice-7.0.0-classes.jar
   < org.lz4_lz4-java-1.8.0.jar
   ```
   
   ### Impact
   
   The assembled Trino plugin directory and hudi-trino's dependency on Guice. 
No connector code changes.
   
   ### Risk Level
   
   low. With Trino built at the #20903 pin, `mvn -Phudi-trino,hudi-trino-tests 
-pl hudi-trino test` passed locally under JDK 25 (903 tests, 0 failures, 183 
skipped, same as on #20903); `trino-e2e` boots a server on the new plugin 
directory.
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] Adequate tests were added if applicable
   


-- 
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]

Reply via email to