roryqi opened a new pull request, #12852:
URL: https://github.com/apache/gravitino/pull/12852
### What changes were proposed in this pull request?
- Expose the Iceberg backend owned by `IcebergCatalogOperations`.
- Reuse that backend when the auxiliary Iceberg REST service serves a memory
catalog.
- Resolve the REST `default_catalog` alias to the configured Gravitino
catalog.
- Prevent the REST wrapper from closing the borrowed catalog.
- Add regression tests covering namespace, table, and view creation for both
explicit catalog names
and the default catalog alias.
### Why are the changes needed?
The auxiliary Iceberg REST service currently creates a second
InMemoryCatalog. REST creates are
written to that instance, while metadata import uses the instance owned by
Gravitino CatalogManager.
Because in-memory state is local to each instance, the import cannot find
the newly created object
and leaves Iceberg and Gravitino metadata inconsistent.
Fix: #12851
### Does this PR introduce _any_ user-facing change?
Yes. Namespace, table, and view creation through the Iceberg REST API now
succeeds with a memory
backend, and the created objects are visible through the Gravitino metadata
API.
No public API or configuration property is added or removed.
### How was this patch tested?
- `./gradlew spotlessApply`
- `./gradlew :iceberg:iceberg-common:test --tests
org.apache.gravitino.iceberg.common.ops.TestIcebergCatalogWrapper`
- `./gradlew :catalogs:catalog-lakehouse-iceberg:compileJava`
- `./gradlew :iceberg:iceberg-rest-server:test --tests
org.apache.gravitino.iceberg.service.TestIcebergCatalogWrapperManagerForREST`
- `./gradlew :iceberg:iceberg-rest-server:test --tests
org.apache.gravitino.iceberg.service.TestIcebergCatalogWrapperManagerForREST
--tests
org.apache.gravitino.iceberg.service.dispatcher.TestIcebergNamespaceHookDispatcher
--tests
org.apache.gravitino.iceberg.service.dispatcher.TestIcebergTableHookDispatcher
--tests
org.apache.gravitino.iceberg.service.dispatcher.TestIcebergViewHookDispatcher`
--
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]