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

   ### Describe the issue this Pull Request addresses
   
   Depends on #20906 and #20903; this branch carries both until they merge, and 
only the last commit belongs to this PR.
   
   Users cannot run hudi-trino on a Trino server today without 
trinodb/trino#30682. A Trino server loads a connector from a plugin directory: 
the connector, a `Plugin` entry point with its 
`META-INF/services/io.trino.spi.Plugin` descriptor, and every runtime 
dependency, all built for that server's Trino version. The 
`org.apache.hudi:hudi-trino` jar on Maven Central is only the connector (1.2.1 
still carries a `HudiPlugin` class, removed in #20043, but no service 
descriptor and no dependencies), and Trino's own `plugin/hudi` bundles its 
entry point in the same jar as Trino's connector, so replacing the connector 
jar alone leaves nothing to load ours.
   
   The in-repo shim at `docker/trino/shim` already assembles that directory for 
the E2E image, but only against the pinned Trino master snapshot.
   
   ### Summary and Changelog
   
   - `scripts/trino/build_plugin_zip.sh`: builds hudi-trino and the in-repo 
shim against one Trino version and writes 
`target/hudi-trino-plugin/hudi-trino-plugin-<hudi>-trino-<trino>.zip`, plus the 
same jars unpacked next to it. `--trino-version` defaults to 
`trino.e2e.version`, the latest Trino release, which resolves from Maven 
Central with no Trino source build; the pinned `trino.version` snapshot works 
after `bootstrap_trino.sh`. The shim is built from a temporary copy whose 
parent is `trino-root` at the requested version, since Maven does not 
interpolate a parent version.
   - `hudi-trino/pom.xml`: `trino-blob-cache-alluxio` and 
`trino-blob-cache-memory` move into the `hudi-trino-tests` profile. Trino does 
not publish them as jars, so `install -Dmaven.test.skip=true` against a 
released Trino failed resolving them.
   - Root pom `trino.e2e.version` and the Dockerfile's default base image: 483 
to 484.
   - `hudi-trino/README.md`: how to build the zip and install it on a server.
   
   To install it on a Trino server of the same version, on the coordinator and 
every worker: delete everything in `plugin/hudi/` except `hdfs/` (Trino's HDFS 
loader jars, shipped only with the server), copy the unpacked jars in, restart. 
The catalog keeps `connector.name=hudi`.
   
   ### Impact
   
   New build script and README section; test-only dependencies move into the 
existing tests profile. No connector code changes.
   
   ### Risk Level
   
   low. Verified locally under JDK 25:
   
   | Check | Result |
   |---|---|
   | Script with defaults (Trino 484 from Maven Central) | zip with 309 jars |
   | That zip unpacked over `plugin/hudi` of stock `trinodb/trino:484` | server 
started: `Registering connector hudi`, `Added catalog hudi using connector 
hudi`, `SELECT 1` ok |
   | Script with `--trino-version 485-SNAPSHOT` (the pin) | zip with 310 jars, 
the same count as the existing E2E shim build |
   | `-Phudi-trino,hudi-trino-tests test-compile` after the profile move | 
passes |
   
   Running the Trino ITs on the release zip is the follow-up that adds a 
release E2E job using this script.
   
   ### Documentation Update
   
   `hudi-trino/README.md` here; the user-facing page on the website follows in 
a separate PR.
   
   ### 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