Class LoggingAuditor

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.fs.s3a.audit.impl.AbstractOperationAuditor
org.apache.hadoop.fs.s3a.audit.impl.LoggingAuditor
All Implemented Interfaces:
Closeable, AutoCloseable, OperationAuditor, org.apache.hadoop.fs.statistics.IOStatisticsSource, org.apache.hadoop.fs.store.audit.AuditSpanSource<AuditSpanS3A>, org.apache.hadoop.service.Service

@Private public class LoggingAuditor extends AbstractOperationAuditor
The LoggingAuditor logs operations at DEBUG (in SDK Request) and in span lifecycle and S3 request class construction at TRACE. The context information is added as the HTTP referrer.
  • Constructor Details

    • LoggingAuditor

      public LoggingAuditor()
      Create the auditor. The UGI current user is used to provide the principal; this will be cached and provided in the referrer header.
  • Method Details

    • serviceInit

      protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Service init, look for jobID and attach as an attribute in log entries. This is where the warning span is created, so the relevant attributes (and filtering options) are applied.
      Overrides:
      serviceInit in class AbstractOperationAuditor
      Parameters:
      conf - configuration
      Throws:
      Exception - failure
    • toString

      public String toString()
      Overrides:
      toString in class org.apache.hadoop.service.AbstractService
    • createSpan

      public AuditSpanS3A createSpan(String operation, @Nullable String path1, @Nullable String path2)
    • addAttribute

      public final void addAttribute(String key, String value)
      Add an attribute.
      Parameters:
      key - key
      value - value
    • getUnbondedSpan

      public AuditSpanS3A getUnbondedSpan()
      Description copied from interface: OperationAuditor
      Get the unbonded span to use after deactivating an active span.
      Returns:
      a span.
    • getLastHeader

      public String getLastHeader()
      Get the last header used.
      Returns:
      the last referrer header generated.