AuditLogger (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.namenode, interface: AuditLogger

Package org.apache.hadoop.hdfs.server.namenode

# Interface AuditLogger

All Known Implementing Classes:
  `DefaultAuditLogger`, `HdfsAuditLogger`

@Public @Evolving public interface AuditLogger
Interface defining an audit logger.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `initialize(Configuration conf)`
  Called during initialization of the logger.
  `void`
  `logAuditEvent(boolean succeeded, String userName, InetAddress addr, String cmd, String src, String dst, FileStatus stat)`
  Called to log an audit event.

- ## Method Details

  - ### initialize

    void initialize(Configuration conf)
    Called during initialization of the logger.
    Parameters:
      `conf` - The configuration object.

  - ### logAuditEvent

    void logAuditEvent(boolean succeeded, String userName, InetAddress addr, String cmd, String src, String dst, FileStatus stat)
    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.

    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).
      `stat` - File information for operations that change the file's metadata (permissions, owner, times, etc).