rickyma commented on code in PR #1937:
URL: 
https://github.com/apache/incubator-uniffle/pull/1937#discussion_r1686236672


##########
bin/start-shuffle-server.sh:
##########
@@ -31,6 +31,7 @@ JAR_DIR="${RSS_HOME}/jars"
 LOG_CONF_FILE="${RSS_CONF_DIR}/log4j2.xml"
 LOG_PATH="${RSS_LOG_DIR}/shuffle_server.log"
 AUDIT_LOG_PATH="${RSS_LOG_DIR}/audit.log"
+RPC_AUDIT_LOG_PATH="${RSS_LOG_DIR}/shuffle_server_audit.log"

Review Comment:
   Perhaps we could choose a different name, as it might be confusing for 
people to see two logs both ending with the "audit" suffix.
   
   If necessary, we could also rename `audit.log` to something else.



##########
server/src/main/java/org/apache/uniffle/server/audit/ServerAuditContext.java:
##########
@@ -0,0 +1,139 @@
+/*
+ * 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.uniffle.server.audit;
+
+import org.slf4j.Logger;
+
+import org.apache.uniffle.common.audit.AuditContext;
+import org.apache.uniffle.common.rpc.StatusCode;
+
+/** An audit context for s3 rest service. */

Review Comment:
   Incorrect comment. It needs to be revised.



##########
server/src/main/java/org/apache/uniffle/server/ShuffleServerConf.java:
##########
@@ -168,6 +168,13 @@ public class ShuffleServerConf extends RssBaseConf {
                   + "removing all associated files and recording the deletion 
of the entire application ID or shuffle ID. "
                   + "For a write operation, it includes the size of the data 
written, the storage type and the specific disk to which it is written "
                   + "(for instance, in scenarios where multiple local disks 
are mounted).");
+  public static final ConfigOption<Boolean> SERVER_RPC_AUDIT_LOG_ENABLED =
+      ConfigOptions.key("rss.server.rpc.audit.log.enabled")

Review Comment:
   Please add this into docs too.



##########
common/src/main/java/org/apache/uniffle/common/audit/AuditContext.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * 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.uniffle.common.audit;
+
+import java.io.Closeable;
+
+/** Context for audit logging. */
+public interface AuditContext extends Closeable {

Review Comment:
   Add the keyword `Rpc` into `AuditContext`?
   
   I don't know if it is better.
   
   Now it may be confusing, because we already have audit.log.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to