Class AbstractAuditSpanImpl

java.lang.Object
org.apache.hadoop.fs.s3a.audit.impl.AbstractAuditSpanImpl
All Implemented Interfaces:
Closeable, AutoCloseable, AuditSpanS3A, AWSAuditEventCallbacks, org.apache.hadoop.fs.store.audit.AuditSpan, software.amazon.awssdk.core.interceptor.ExecutionInterceptor
Direct Known Subclasses:
NoopSpan

public abstract class AbstractAuditSpanImpl extends Object implements AuditSpanS3A
Base class for the audit spans implementations..
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractAuditSpanImpl(String spanId, long timestamp, String operationName)
    Constructor.
    protected
    AbstractAuditSpanImpl(String spanId, String operationName)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    final void
    Invoke AuditSpan.deactivate().
    Get the name of the operation.
    final String
    Return a span ID which must be unique for all spans within everywhere.
    final long
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.hadoop.fs.store.audit.AuditSpan

    deactivate, isValidSpan, set

    Methods inherited from interface org.apache.hadoop.fs.s3a.audit.AWSAuditEventCallbacks

    requestCreated

    Methods inherited from interface software.amazon.awssdk.core.interceptor.ExecutionInterceptor

    afterExecution, afterMarshalling, afterTransmission, afterUnmarshalling, beforeExecution, beforeMarshalling, beforeTransmission, beforeUnmarshalling, modifyAsyncHttpContent, modifyAsyncHttpResponseContent, modifyException, modifyHttpContent, modifyHttpRequest, modifyHttpResponse, modifyHttpResponseContent, modifyRequest, modifyResponse, onExecutionFailure
  • Constructor Details

    • AbstractAuditSpanImpl

      protected AbstractAuditSpanImpl(String spanId, String operationName)
      Constructor.
      Parameters:
      spanId - span ID.
      operationName - operation name
    • AbstractAuditSpanImpl

      protected AbstractAuditSpanImpl(String spanId, long timestamp, String operationName)
      Constructor.
      Parameters:
      spanId - span ID.
      timestamp - timestamp in millis
      operationName - operation name
  • Method Details

    • getSpanId

      public final String getSpanId()
      Description copied from interface: AWSAuditEventCallbacks
      Return a span ID which must be unique for all spans within everywhere. That effectively means part of the span SHOULD be derived from a UUID. Callers MUST NOT make any assumptions about the actual contents or structure of this string other than the uniqueness.
      Specified by:
      getSpanId in interface org.apache.hadoop.fs.store.audit.AuditSpan
      Specified by:
      getSpanId in interface AWSAuditEventCallbacks
      Returns:
      a non-empty string
    • getOperationName

      public String getOperationName()
      Description copied from interface: AWSAuditEventCallbacks
      Get the name of the operation.
      Specified by:
      getOperationName in interface org.apache.hadoop.fs.store.audit.AuditSpan
      Specified by:
      getOperationName in interface AWSAuditEventCallbacks
      Returns:
      the operation name.
    • getTimestamp

      public final long getTimestamp()
      Specified by:
      getTimestamp in interface org.apache.hadoop.fs.store.audit.AuditSpan
    • activate

      public AuditSpanS3A activate()
      Specified by:
      activate in interface org.apache.hadoop.fs.store.audit.AuditSpan
    • close

      public final void close()
      Invoke AuditSpan.deactivate(). This is final: subclasses MUST override the deactivate() method.
      Specified by:
      close in interface org.apache.hadoop.fs.store.audit.AuditSpan
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable