/** * Log the audit event for kill by client. * @param event The {@link RMAppEvent} to be logged */ static void auditLogKillEvent(RMAppEvent event) { if (event instanceof RMAppKillByClientEvent) { RMAppKillByClientEvent killEvent = (RMAppKillByClientEvent) event; UserGroupInformation callerUGI = killEvent.getCallerUGI(); String userName = null; if (callerUGI != null) { userName = callerUGI.getShortUserName(); } InetAddress remoteIP = killEvent.getIp(); RMAuditLogger.logSuccess(userName, AuditConstants.KILL_APP_REQUEST, "RMAppImpl", event.getApplicationId(), remoteIP); } }
/** * Log the audit event for kill by client. * * @param event * The {@link RMAppEvent} to be logged */ static void auditLogKillEvent(RMAppEvent event) { if (event instanceof RMAppKillByClientEvent) { RMAppKillByClientEvent killEvent = (RMAppKillByClientEvent) event; UserGroupInformation callerUGI = killEvent.getCallerUGI(); String userName = null; if (callerUGI != null) { userName = callerUGI.getShortUserName(); } InetAddress remoteIP = killEvent.getIp(); RMAuditLogger.logSuccess(userName, AuditConstants.KILL_APP_REQUEST, "RMAppImpl", event.getApplicationId(), remoteIP); } }