Package org.apache.hadoop.fs.s3a.audit
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 TypeMethodDescriptiondefault booleancheckAccess(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.voidinit(OperationAuditorOptions options) Initialize.default voidnoteSpanReferenceLost(long threadId) Span reference lost from GC operations.voidsetAuditFlags(EnumSet<AuditorFlags> flags) Update audit flags, especially the out of span rejection option.Methods inherited from interface org.apache.hadoop.fs.store.audit.AuditSpanSource
createSpanMethods inherited from interface org.apache.hadoop.fs.statistics.IOStatisticsSource
getIOStatisticsMethods 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
Initialize. The base class will callService.init(Configuration).- Parameters:
options- options to initialize with.
-
setAuditFlags
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 theFileSystem.access()command and is a soft permission check used by Hive.- Parameters:
path- path to checkstatus- 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.
-