You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/03/29 19:04:28 UTC

[GitHub] [hbase] saintstack commented on a change in pull request #3101: HBASE-25558:Adding audit log for execMasterService

saintstack commented on a change in pull request #3101:
URL: https://github.com/apache/hbase/pull/3101#discussion_r603541406



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
##########
@@ -963,6 +963,12 @@ public SplitTableRegionResponse splitRegion(final RpcController controller,
       if (execController.getFailedOn() != null) {
         throw execController.getFailedOn();
       }
+
+      String remoteAddress = RpcServer.getRemoteAddress().map(InetAddress::toString).orElse("");
+      User caller = RpcServer.getRequestUser().orElse(null);
+      AUDITLOG.info("User {} (remote address: {}) master service request for {}.{}", caller,
+        remoteAddress, serviceName, methodName);

Review comment:
       Can we log more than methodName or perhaps methodName is what we usually put in 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.

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