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