org.apache.hadoop.yarn.server.nodemanager
Class NMAuditLogger

java.lang.Object
  extended by org.apache.hadoop.yarn.server.nodemanager.NMAuditLogger

public class NMAuditLogger
extends Object

Manages NodeManager audit logs. Audit log format is written as key=value pairs. Tab separated.


Nested Class Summary
static class NMAuditLogger.AuditConstants
           
 
Constructor Summary
NMAuditLogger()
           
 
Method Summary
static void logFailure(String user, String operation, String target, String description)
          Create a readable and parseable audit log string for a failed event.
static void logFailure(String user, String operation, String target, String description, org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ContainerId containerId)
          Create a readable and parseable audit log string for a failed event.
static void logSuccess(String user, String operation, String target)
          Create a readable and parseable audit log string for a successful event.
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)
          Create a readable and parseable audit log string for a successful event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NMAuditLogger

public NMAuditLogger()
Method Detail

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)
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.
appId - Application Id in which operation was performed.
containerId - Container Id in which operation was performed.

Note that the NMAuditLogger uses 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)
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 the NMAuditLogger uses 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 target,
                              String description,
                              org.apache.hadoop.yarn.api.records.ApplicationId appId,
                              org.apache.hadoop.yarn.api.records.ContainerId containerId)
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.
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.
containerId - Container Id in which operation was performed.

Note that the NMAuditLogger uses 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 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.
target - The target on which the operation is being performed.
description - Some additional information as to why the operation failed.

Note that the NMAuditLogger uses tabs ('\t') as a key-val delimiter and hence the value fields should not contains tabs ('\t').


Copyright © 2012 Apache Software Foundation. All Rights Reserved.