AuditLogger@Private public class TopAuditLogger extends java.lang.Object implements AuditLogger
AuditLogger that sends logged data directly to the metrics
systems. It is used when the top service is used directly by the name node| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Constructor | Description |
|---|---|
TopAuditLogger() |
|
TopAuditLogger(TopMetrics topMetrics) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
initialize(org.apache.hadoop.conf.Configuration conf) |
Called during initialization of the logger.
|
void |
logAuditEvent(boolean succeeded,
java.lang.String userName,
java.net.InetAddress addr,
java.lang.String cmd,
java.lang.String src,
java.lang.String dst,
org.apache.hadoop.fs.FileStatus status) |
Called to log an audit event.
|
public TopAuditLogger()
public TopAuditLogger(TopMetrics topMetrics)
public void initialize(org.apache.hadoop.conf.Configuration conf)
AuditLoggerinitialize in interface AuditLoggerconf - The configuration object.public void logAuditEvent(boolean succeeded,
java.lang.String userName,
java.net.InetAddress addr,
java.lang.String cmd,
java.lang.String src,
java.lang.String dst,
org.apache.hadoop.fs.FileStatus status)
AuditLoggerThis method must return as quickly as possible, since it's called in a critical section of the NameNode's operation.
logAuditEvent in interface AuditLoggersucceeded - 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).Copyright © 2008–2025 Apache Software Foundation. All rights reserved.