[Cherry-pick to branch-1.3] [#12554] improvement(trino-connector): Route lakehouse-iceberg catalogs through the Iceberg REST server (#12555) - #12754
Merged
Conversation
…gs through the Iceberg REST server (#12555) ### What changes were proposed in this pull request? The Trino connector builds an internal Iceberg REST catalog pointing at the Gravitino Iceberg REST server for every `lakehouse-iceberg` catalog, instead of translating `catalog-backend` into Trino's `jdbc` or `hive_metastore` catalog type. Three connector-level properties, configured once per Trino cluster: - `gravitino.iceberg.rest-enabled` (default `true`) - `gravitino.iceberg.rest-uri` - `gravitino.iceberg.rest-catalog.` — prefix rewritten to `iceberg.rest-catalog.`, carrying the IRC's authentication Everything else is derived from the catalog. A catalog with `catalog-backend=rest` is not re-routed. This also drops Trino 435-439 support. The routing sets `iceberg.rest-catalog.vended-credentials-enabled`, which Trino only recognizes from 439 onwards, and Trino rejects unknown catalog properties outright. The minimum supported version is now 440. ### Why are the changes needed? `credential-providers=s3-token` is silently non-functional on this path. Fix: #12554 ### Does this PR introduce _any_ user-facing change? Yes, two breaking changes, both needing a release note: - `gravitino.iceberg.rest-enabled` defaults to `true`, so on upgrade a metalake with `catalog-backend=jdbc` or `hive` Iceberg catalogs fails to load them unless `gravitino.iceberg.rest-uri` is set, or the switch is turned off. - Trino 435-439 is no longer supported; the `trino-connector-435-439` module is removed. Three new connector properties. Docs updated under `docs/trino-connector/`. ### How was this patch tested? Unit tests: 155 pass, 20 new. Integration test: the existing `lakehouse-iceberg` testset runs over the new path, 24/24 pass across a hive-backend and a jdbc-backend catalog. Not verified: end-to-end `s3-token` vending. The test warehouse is HDFS, which skips credential generation, so no temporary credential is actually issued. This is coverable without a cloud account — `MinIOContainer` and `IcebergRESTMinIOTokenAuthorizationIT` already exercise real STS `AssumeRole` at the IRC layer — and is worth a follow-up. # Conflicts: # docs/trino-connector/configuration.md # trino-connector/trino-connector/src/test/java/org/apache/gravitino/trino/connector/catalog/TestCatalogConnectorManager.java
Resolve conflict markers left by the cherry-pick bot in TestCatalogConnectorManager.java and configuration.md, dropping test methods/imports that belong to an unrelated feature (#12572) not yet present on branch-1.3. Also merge the branch-1.3 update that drops Trino 435-439 support (#12707), which changes the correct multi-metalake version range from 435-445 back to 440-445.
…0-to-branch-1.3 # Conflicts: # docs/trino-connector/configuration.md # trino-connector/trino-connector/src/test/java/org/apache/gravitino/trino/connector/TestGravitinoConnectorPluginManager.java
Author
Code Coverage Report
Files
|
Contributor
|
@diqiu50 please fix the conflict. |
…0-to-branch-1.3 # Conflicts: # docs/trino-connector/configuration.md
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.
Cherry-pick Information:
branch-1.3