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

   ### What changes were proposed in this pull request?
   
   - Introduce `ViewInfo` and view event types (pre/success/failure) for list, 
load, create, alter, and drop, aligned with existing `OperationType` view 
entries.
   - Add `ViewEventDispatcher` to emit those events on the `EventBus`, and 
`ViewHookDispatcher` for ownership on create, privilege rename on view rename, 
and privilege cleanup on drop (mirroring table behavior).
   - Wire `GravitinoEnv` so the view stack is `ViewHookDispatcher` → 
`ViewEventDispatcher` → `ViewNormalizeDispatcher` → `ViewOperationDispatcher`.
   - Map the new events in `AuditLog.Operation.fromEvent` so audit logs are not 
`UNKNOWN_OPERATION` for view ops.
   - Add `TestViewEvent` and extend `TestOperation` for audit mapping.
   
   ### Why are the changes needed?
   
   View operations did not go through the same listener and hook chain as 
tables, so `EventListenerPlugin` implementations could not observe view CRUD 
and audit could not classify view events. This addresses the subtask for 
table-style view event hooks.
   
   Fix: #11002
   
   ### Does this PR introduce _any_ user-facing change?
   
   **Yes.** Event listeners and audit integrations now receive view CRUD events 
(and related audit operation types). No REST or client API surface changes; 
`viewExists` remains without dedicated events, consistent with `tableExists`.
   
   ### How was this patch tested?
   
   - `./gradlew :core:spotlessApply :core:test --tests 
org.apache.gravitino.listener.api.event.TestViewEvent --tests 
org.apache.gravitino.audit.TestOperation -PskipITs`


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