Class TopAuditLogger
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.top.TopAuditLogger
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(org.apache.hadoop.conf.Configuration conf) Called during initialization of the logger.voidlogAuditEvent(boolean succeeded, String userName, InetAddress addr, String cmd, String src, String dst, org.apache.hadoop.fs.FileStatus status) Called to log an audit event.
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
TopAuditLogger
public TopAuditLogger() -
TopAuditLogger
-
-
Method Details
-
initialize
public void initialize(org.apache.hadoop.conf.Configuration conf) Description copied from interface:AuditLoggerCalled during initialization of the logger.- Specified by:
initializein interfaceAuditLogger- 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:AuditLoggerCalled 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:
logAuditEventin interfaceAuditLogger- 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).
-