Class RMAuditLogger
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger
Manages ResourceManager audit logs.
Audit log format is written as key=value pairs. Tab separated.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder to create and pass a list of arbitrary key value pairs for logging.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCreate a readable and parseable audit log string for a failed event.static voidlogFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId) Create a readable and parseable audit log string for a failed event.static voidlogFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, String queueName) static voidlogFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.ipc.CallerContext callerContext) static voidlogFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.ipc.CallerContext callerContext, String queueName) static voidlogFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.ipc.CallerContext callerContext, String queueName, String partition) Create a readable and parseable audit log string for a failed event.static voidlogFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId) Create a readable and parseable audit log string for a failed event.static voidlogFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.Resource resource) Create a readable and parseable audit log string for a failed event.static voidlogFailure(String user, String operation, String perm, String target, String description, RMAuditLogger.ArgsBuilder args) Create a readable and parseable audit log string for a failed event.static voidlogSuccess(String user, String operation, String target) Create a readable and parseable audit log string for a successful event.static voidlogSuccess(String user, String operation, String target, InetAddress ip, RMAuditLogger.ArgsBuilder args) Create a general readable and parseable audit log string for a successful event.static voidlogSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId) Create a readable and parseable audit log string for a successful event.static voidlogSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, InetAddress ip) Create a readable and parseable audit log string for a successful event.static voidlogSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.ipc.CallerContext callerContext) static voidlogSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.ipc.CallerContext callerContext, String queueName) static voidlogSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.ipc.CallerContext callerContext, String queueName, String partition) static voidlogSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId) Create a readable and parseable audit log string for a successful event.static voidlogSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.Resource resource) Create a readable and parseable audit log string for a successful event.static voidlogSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.Resource resource, String queueName, String partition) Create a readable and parseable audit log string for a successful event.static voidlogSuccess(String user, String operation, String target, RMAuditLogger.ArgsBuilder args) Create a general readable and parseable audit log string for a successful event.
-
Constructor Details
-
RMAuditLogger
public RMAuditLogger()
-
-
Method Details
-
logSuccess
public static void logSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.Resource resource) Create a readable and parseable audit log string for a successful event.- Parameters:
user- User who made the service request to the ResourceManageroperation- Operation requested by the user.target- The target on which the operation is being performed.appId- Application Id in which operation was performed.containerId- Container Id in which operation was performed.resource- Resource associated with container.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logSuccess
public static void logSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.Resource resource, String queueName, String partition) Create a readable and parseable audit log string for a successful event.- Parameters:
user- User who made the service request to the ResourceManageroperation- Operation requested by the user.target- The target on which the operation is being performed.appId- Application Id in which operation was performed.containerId- Container Id in which operation was performed.resource- Resource associated with container.queueName- Name of queue.partition- Name of labeled partition.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logSuccess
public static void logSuccess(String user, String operation, String target, RMAuditLogger.ArgsBuilder args) Create a general readable and parseable audit log string for a successful event.- Parameters:
user- User who made the service request to the ResourceManager.operation- Operation requested by the user.target- The target on which the operation is being performed.args- The ArgsBuilder arguments for the operation request.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
This method will attempt to retrieve the remote IP
-
logSuccess
public static void logSuccess(String user, String operation, String target, InetAddress ip, RMAuditLogger.ArgsBuilder args) Create a general readable and parseable audit log string for a successful event.- Parameters:
user- User who made the service request to the ResourceManager.operation- Operation requested by the user.target- The target on which the operation is being performed.ip- The ip address of the caller.args- The ArgsBuilder arguments for the operation request.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logSuccess
-
logSuccess
public static void logSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId) Create a readable and parseable audit log string for a successful event.- Parameters:
user- User who made the service request to the ResourceManager.operation- Operation requested by the user.target- The target on which the operation is being performed.appId- Application Id in which operation was performed.attemptId- Application Attempt Id in which operation was performed.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logSuccess
-
logSuccess
-
logSuccess
public static void logSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId, InetAddress ip) Create a readable and parseable audit log string for a successful event.- Parameters:
user- User who made the service request to the ResourceManager.operation- Operation requested by the user.target- The target on which the operation is being performed.appId- Application Id in which operation was performed.ip- The ip address of the caller.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logSuccess
public static void logSuccess(String user, String operation, String target, org.apache.hadoop.yarn.api.records.ApplicationId appId) Create a readable and parseable audit log string for a successful event.- Parameters:
user- User who made the service request to the ResourceManager.operation- Operation requested by the user.target- The target on which the operation is being performed.appId- Application Id in which operation was performed.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logSuccess
Create a readable and parseable audit log string for a successful event.- Parameters:
user- User who made the service request.operation- Operation requested by the user.target- The target on which the operation is being performed.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logFailure
public static void logFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.Resource resource) Create a readable and parseable audit log string for a failed event.- Parameters:
user- User who made the service request.operation- Operation requested by the user.perm- Target permissions.target- The target on which the operation is being performed.description- Some additional information as to why the operation failed.appId- Application Id in which operation was performed.containerId- Container Id in which operation was performed.resource- Resources associated with container.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logFailure
public static void logFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId) Create a readable and parseable audit log string for a failed event.- Parameters:
user- User who made the service request.operation- Operation requested by the user.perm- Target permissions.target- The target on which the operation is being performed.description- Some additional information as to why the operation failed.appId- ApplicationId in which operation was performed.attemptId- Application Attempt Id in which operation was performed.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logFailure
-
logFailure
-
logFailure
public static void logFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId) Create a readable and parseable audit log string for a failed event.- Parameters:
user- User who made the service request.operation- Operation requested by the user.perm- Target permissions.target- The target on which the operation is being performed.description- Some additional information as to why the operation failed.appId- ApplicationId in which operation was performed.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logFailure
-
logFailure
public static void logFailure(String user, String operation, String perm, String target, String description) Create a readable and parseable audit log string for a failed event.- Parameters:
user- User who made the service request.operation- Operation requested by the user.perm- Target permissions.target- The target on which the operation is being performed.description- Some additional information as to why the operation failed.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logFailure
public static void logFailure(String user, String operation, String perm, String target, String description, RMAuditLogger.ArgsBuilder args) Create a readable and parseable audit log string for a failed event.- Parameters:
user- User who made the service request.operation- Operation requested by the user.perm- Target permissions.target- The target on which the operation is being performed.description- The failure descriptionargs- The arguments for the operation request.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-
logFailure
public static void logFailure(String user, String operation, String perm, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.ipc.CallerContext callerContext, String queueName, String partition) Create a readable and parseable audit log string for a failed event.- Parameters:
user- User who made the service request.operation- Operation requested by the user.perm- Target permissions.target- The target on which the operation is being performed.description- Some additional information as to why the operation failed.appId- ApplicationId in which operation was performed.callerContext- Caller contextqueueName- Name of queue.partition- Name of labeled partition.
Note that theRMAuditLoggeruses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').
-