Class RouterAuditLogger
java.lang.Object
org.apache.hadoop.yarn.server.router.RouterAuditLogger
Manages Router audit logs.
Audit log format is written as key=value pairs. Tab separated.
-
Nested Class Summary
Nested Classes -
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 descriptionFormat, Object... args) 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) 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.server.federation.store.records.SubClusterId subClusterId) 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.server.federation.store.records.SubClusterId subClusterId) Create a readable and parsable audit log string for a failed event.static voidlogSuccess(String user, String operation, String target) 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, org.apache.hadoop.yarn.server.federation.store.records.SubClusterId subClusterId) Create a readable and parseable audit log string for a successful event.
-
Method Details
-
logSuccess
-
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 Routeroperation- 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 theRouterAuditLoggeruses 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.server.federation.store.records.SubClusterId subClusterId) Create a readable and parseable audit log string for a successful event.- Parameters:
user- User who made the service request to the Routeroperation- Operation requested by the user.target- The target on which the operation is being performed.appId- Application Id in which operation was performed.subClusterId- Subcluster Id in which operation is performed.
Note that theRouterAuditLoggeruses 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) 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 theRouterAuditLoggeruses 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 descriptionFormat, Object... 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.descriptionFormat- the description message format string.args- format parameter.
Note that theRouterAuditLoggeruses 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) 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.
Note that theRouterAuditLoggeruses 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.server.federation.store.records.SubClusterId subClusterId) 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.subClusterId- SubCluster Id in which operation was performed.
Note that theRouterAuditLoggeruses 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.server.federation.store.records.SubClusterId subClusterId) Create a readable and parsable 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.subClusterId- SubCluster Id in which operation was performed.
-