Class TopAuditLogger

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.top.TopAuditLogger
All Implemented Interfaces:
AuditLogger

@Private public class TopAuditLogger extends Object implements AuditLogger
An AuditLogger that sends logged data directly to the metrics systems. It is used when the top service is used directly by the name node
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

    • TopAuditLogger

      public TopAuditLogger()
    • TopAuditLogger

      public TopAuditLogger(TopMetrics topMetrics)
  • Method Details

    • initialize

      public void initialize(org.apache.hadoop.conf.Configuration conf)
      Description copied from interface: AuditLogger
      Called during initialization of the logger.
      Specified by:
      initialize in interface AuditLogger
      Parameters:
      conf - The configuration object.
    • logAuditEvent

      public void logAuditEvent(boolean succeeded, String userName, InetAddress addr, String cmd, String src, String dst, org.apache.hadoop.fs.FileStatus status)
      Description copied from interface: AuditLogger
      Called to log an audit event.

      This method must return as quickly as possible, since it's called in a critical section of the NameNode's operation.

      Specified by:
      logAuditEvent in interface AuditLogger
      Parameters:
      succeeded - Whether authorization succeeded.
      userName - Name of the user executing the request.
      addr - Remote address of the request.
      cmd - The requested command.
      src - Path of affected source file.
      dst - Path of affected destination file (if any).
      status - File information for operations that change the file's metadata (permissions, owner, times, etc).