puchengy commented on code in PR #5580:
URL: https://github.com/apache/gravitino/pull/5580#discussion_r1842584321


##########
core/src/main/java/org/apache/gravitino/audit/AuditLog.java:
##########
@@ -124,12 +128,32 @@ public interface AuditLog {
   long timestamp();
 
   /**
-   * The status of the operation.
-   *
+   * @deprecated 0.8.0 The status of the operation.
    * @return operation status.
    */
+  @Deprecated
   Status status();
 
+  /** @since 0.8.0 */
+  default String remoteAddr() {
+    return "unknown";
+  }
+
+  /** @since 0.8.0 */
+  default OperationStatus operationStatus() {
+    return OperationStatus.UNKNOWN;
+  }
+
+  /** @since 0.8.0 */
+  default OperationType operationType() {
+    return OperationType.UNKNOWN;
+  }
+
+  /** @since 0.8.0 */
+  default Map<String, String> customData() {

Review Comment:
   nit, should this be called `customizedData` ? Also, I am curious why do we 
call this `customData` given user can't not make customization to it? 



##########
core/src/main/java/org/apache/gravitino/listener/api/event/EventInfo.java:
##########
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.gravitino.listener.api.event;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+import org.apache.gravitino.NameIdentifier;
+
+// The general event information.
+public interface EventInfo {
+  enum OperationStatus {
+    NOT_PROCESS,
+    SUCC,
+    FAIL,
+    UNKNOWN,
+  }
+
+  enum OperationType {
+    CREATE_ICEBERG_TABLE,
+    DROP_ICEBERG_TABLE,
+    ALTER_ICEBERG_TABLE,
+    LOAD_ICEBERG_TABLE,

Review Comment:
   nit, core module is supposed to be generic and don't tie to any of the 
specific table format? I wonder if we should make it more generic?



##########
core/src/main/java/org/apache/gravitino/listener/api/event/EventInfo.java:
##########
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.gravitino.listener.api.event;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+import org.apache.gravitino.NameIdentifier;
+
+// The general event information.
+public interface EventInfo {
+  enum OperationStatus {
+    NOT_PROCESS,
+    SUCC,
+    FAIL,
+    UNKNOWN,
+  }
+
+  enum OperationType {
+    CREATE_ICEBERG_TABLE,
+    DROP_ICEBERG_TABLE,
+    ALTER_ICEBERG_TABLE,
+    LOAD_ICEBERG_TABLE,
+
+    UNKNOWN,
+  }
+
+  String user();
+
+  long eventTimeAtMs();
+
+  NameIdentifier identifier();

Review Comment:
   Curious what does a identifier mean?



##########
core/src/main/java/org/apache/gravitino/listener/api/event/EventInfo.java:
##########
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.gravitino.listener.api.event;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+import org.apache.gravitino.NameIdentifier;
+
+// The general event information.
+public interface EventInfo {

Review Comment:
   nit, maybe a few more comments for the interface?



##########
core/src/main/java/org/apache/gravitino/listener/api/event/BaseEvent.java:
##########
@@ -76,7 +78,8 @@ public NameIdentifier identifier() {
    *
    * @return The event creation time in milliseconds since epoch.
    */
-  public long eventTime() {
+  @Override
+  public long eventTimeAtMs() {

Review Comment:
   nit, mayeb `eventTimeInMs` ?



##########
core/src/main/java/org/apache/gravitino/listener/api/event/EventInfo.java:
##########
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.gravitino.listener.api.event;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+import org.apache.gravitino.NameIdentifier;
+
+// The general event information.
+public interface EventInfo {
+  enum OperationStatus {
+    NOT_PROCESS,
+    SUCC,

Review Comment:
   nit, maybe `SUCCESS` ?



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