laserninja opened a new pull request, #11828:
URL: https://github.com/apache/gravitino/pull/11828

   ## Summary
   Implement the `registerView` endpoint (`POST 
/v1/{prefix}/namespaces/{namespace}/register-view`) for the Gravitino Iceberg 
REST catalog service, using the `V1_REGISTER_VIEW` support added in Iceberg 
1.11.0.
   
   ## Problem
   Fixes #10548
   
   The Gravitino Iceberg REST catalog service did not implement the 
`registerView` endpoint. With the Iceberg dependency upgraded to 1.11.0, 
`CatalogHandlers.registerView()`, `RegisterViewRequest`, and 
`Endpoint.V1_REGISTER_VIEW` are now available.
   
   ## Solution
   - Added `registerView()` to `IcebergCatalogWrapper` delegating to 
`CatalogHandlers.registerView`
   - Added `REGISTER_VIEW` to `OperationType` enum and `AuditLog.Operation` 
enum with compatibility mapping
   - Created 3 event classes: `IcebergRegisterViewPreEvent`, 
`IcebergRegisterViewEvent`, `IcebergRegisterViewFailureEvent`
   - Extended `IcebergViewOperationDispatcher` interface and all 3 
implementations (Executor, EventDispatcher, HookDispatcher)
   - Created `IcebergViewRegisterOperations` REST endpoint class at 
`@Path("/v1/{prefix}/namespaces/{namespace}/register-view")`
   - Advertised `V1_REGISTER_VIEW` in config endpoint view endpoints list
   - Registered the new class in `IcebergRESTAuthInterceptionService` for 
authorization interception
   
   ## Testing
   - [x] All existing tests pass (core: 1439 tests, iceberg-rest-server: 331+ 
tests, iceberg-common: all pass)
   - [x] Added test: `TestIcebergViewOperations.testRegisterView` (success, 
namespace-not-found 404, already-exists 409 cases + event verification)
   - [x] Added test: `TestIcebergViewOperationExecutor.testRegisterView`
   - [x] Added mock: `CatalogWrapperForTest.registerView` with namespace 
existence check and failure simulation


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