FANNG1 commented on code in PR #5998:
URL: https://github.com/apache/gravitino/pull/5998#discussion_r1912594119


##########
core/src/main/java/org/apache/gravitino/listener/TagEventDispatcher.java:
##########
@@ -57,8 +68,9 @@ public TagEventDispatcher(EventBus eventBus, TagDispatcher 
dispatcher) {
   public String[] listTags(String metalake) {
     // TODO: listTagsPreEvent
     try {
-      // TODO: listTagsEvent
-      return dispatcher.listTags(metalake);
+      String[] tagNames = dispatcher.listTags(metalake);
+      eventBus.dispatchEvent(new 
ListTagEvent(PrincipalUtils.getCurrentUserName(), metalake));

Review Comment:
   could you rename ListTagsFailureEvent to ListTagFailureEvent to keep 
consistent with other list event?



##########
core/src/main/java/org/apache/gravitino/listener/TagEventDispatcher.java:
##########
@@ -70,8 +82,10 @@ public String[] listTags(String metalake) {
   public Tag[] listTagsInfo(String metalake) {
     // TODO: listTagsInfoPreEvent
     try {
-      // TODO: listTagsInfoEvent
-      return dispatcher.listTagsInfo(metalake);
+      Tag[] tags = dispatcher.listTagsInfo(metalake);
+      eventBus.dispatchEvent(
+          new ListTagInfoEvent(PrincipalUtils.getCurrentUserName(), metalake, 
tags));
+      return tags;
     } catch (Exception e) {
       eventBus.dispatchEvent(
           new ListTagsInfoFailureEvent(PrincipalUtils.getCurrentUserName(), 
metalake, e));

Review Comment:
   could you rename `ListTagsInfoFailureEvent` to `ListTagInfoFailureEvent` to 
keep consistent with other list event?



-- 
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: commits-unsubscr...@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to