You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/10/19 18:45:06 UTC

[GitHub] [incubator-kyuubi] timothy65535 commented on a change in pull request #908: [KYUUBI #891] Add audit log for sql statement

timothy65535 commented on a change in pull request #908:
URL: https://github.com/apache/incubator-kyuubi/pull/908#discussion_r732148819



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/events/KyuubiAuditEvent.scala
##########
@@ -0,0 +1,61 @@
+/*
+ * 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.kyuubi.events
+
+import org.apache.kyuubi.Utils
+
+/**
+ *
+ * @param createTime: the create time of this statement
+ * @param user: who connect to kyuubi server
+ * @param remoteIp: the ip of user
+ * @param statementId: the identifier of operationHandler
+ * @param sessionId: the identifier of a session
+ * @param state: store each state that the sql has
+ * @param completedTime: the time that the sql's state change
+ * @param statement: the sql that you execute
+ * @param elapsedTime: the time that the sql elapsed
+ */
+case class KyuubiAuditEvent(

Review comment:
       An idea: we should have a clear motivation to introduce the audit log feature, don't like #1223
   
   These loggers will write events synchronously, they will affect the profermance.
   
   **Events**
   - SessionEvent at both engine side and server side.
   - SparkStatementEvent at engine side and server side.
   - Kyuubi Server Event
   - Ongoing kyuubi audit log 
   
   **Logger**
   - SparkLogger
   - JsonLogger
   




-- 
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-unsubscribe@kyuubi.apache.org

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