HBASE-25558:Adding audit log for execMasterService (#3101)
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
024248994f
commit
e14ec57eee
|
@ -963,6 +963,12 @@ public class MasterRpcServices extends RSRpcServices implements
|
|||
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);
|
||||
|
||||
return CoprocessorRpcUtils.getResponse(execResult, HConstants.EMPTY_BYTE_ARRAY);
|
||||
} catch (IOException ie) {
|
||||
throw new ServiceException(ie);
|
||||
|
|
Loading…
Reference in New Issue