Interface OperationAuditor

All Superinterfaces:
org.apache.hadoop.fs.store.audit.AuditSpanSource<AuditSpanS3A>, AutoCloseable, Closeable, org.apache.hadoop.fs.statistics.IOStatisticsSource, org.apache.hadoop.service.Service
All Known Implementing Classes:
AbstractOperationAuditor, LoggingAuditor, NoopAuditor

public interface OperationAuditor extends org.apache.hadoop.service.Service, org.apache.hadoop.fs.statistics.IOStatisticsSource, org.apache.hadoop.fs.store.audit.AuditSpanSource<AuditSpanS3A>
Interfaces for audit services to implement.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    checkAccess(org.apache.hadoop.fs.Path path, S3AFileStatus status, org.apache.hadoop.fs.permission.FsAction mode)
    Check for permission to access a path.
    Get the Auditor ID.
    Get the unbonded span to use after deactivating an active span.
    void
    Initialize.
    default void
    noteSpanReferenceLost(long threadId)
    Span reference lost from GC operations.
    void
    Update audit flags, especially the out of span rejection option.

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

    createSpan

    Methods inherited from interface org.apache.hadoop.fs.statistics.IOStatisticsSource

    getIOStatistics

    Methods inherited from interface org.apache.hadoop.service.Service

    close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
  • Method Details

    • init

      void init(OperationAuditorOptions options)
      Initialize. The base class will call Service.init(Configuration).
      Parameters:
      options - options to initialize with.
    • setAuditFlags

      void setAuditFlags(EnumSet<AuditorFlags> flags)
      Update audit flags, especially the out of span rejection option.
      Parameters:
      flags - audit flags.
    • getUnbondedSpan

      AuditSpanS3A getUnbondedSpan()
      Get the unbonded span to use after deactivating an active span.
      Returns:
      a span.
    • checkAccess

      default boolean checkAccess(org.apache.hadoop.fs.Path path, S3AFileStatus status, org.apache.hadoop.fs.permission.FsAction mode) throws IOException
      Check for permission to access a path. The path is fully qualified and the status is the status of the path. This is called from the FileSystem.access() command and is a soft permission check used by Hive.
      Parameters:
      path - path to check
      status - status of the path.
      mode - access mode.
      Returns:
      true if access is allowed.
      Throws:
      IOException - failure
    • getAuditorId

      String getAuditorId()
      Get the Auditor ID.
      Returns:
      ID
    • noteSpanReferenceLost

      default void noteSpanReferenceLost(long threadId)
      Span reference lost from GC operations. This is only called when an attempt is made to retrieve on the active thread or when a prune operation is cleaning up.
      Parameters:
      threadId - thread ID.