Package org.apache.hadoop.fs.s3a.audit
Interface AuditManagerS3A
- All Superinterfaces:
org.apache.hadoop.fs.store.audit.ActiveThreadSpanSource<AuditSpanS3A>,org.apache.hadoop.fs.store.audit.AuditSpanSource<AuditSpanS3A>,AutoCloseable,AWSAuditEventCallbacks,Closeable,software.amazon.awssdk.core.interceptor.ExecutionInterceptor,org.apache.hadoop.service.Service
- All Known Implementing Classes:
ActiveAuditManagerS3A,NoopAuditManagerS3A
@Private
public interface AuditManagerS3A
extends org.apache.hadoop.service.Service, org.apache.hadoop.fs.store.audit.AuditSpanSource<AuditSpanS3A>, AWSAuditEventCallbacks, org.apache.hadoop.fs.store.audit.ActiveThreadSpanSource<AuditSpanS3A>
Interface for Audit Managers auditing operations through the
AWS libraries.
The Audit Manager is the binding between S3AFS and the instantiated
plugin point -it adds:
- per-thread tracking of audit spans
- The wiring up to the AWS SDK
- State change tracking for copy operations (does not address issue)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckAccess(org.apache.hadoop.fs.Path path, S3AFileStatus status, org.apache.hadoop.fs.permission.FsAction mode) Check for permission to access a path.List<software.amazon.awssdk.core.interceptor.ExecutionInterceptor>Create the execution interceptor(s) for this audit service.software.amazon.awssdk.transfer.s3.progress.TransferListenerReturn a transfer callback which fixes the active span context to be that in which the transfer listener was created.Get the auditor; valid once initialized.voidsetAuditFlags(EnumSet<AuditorFlags> flags) Update audit flags, especially the out of span rejection option.Methods inherited from interface org.apache.hadoop.fs.store.audit.ActiveThreadSpanSource
getActiveAuditSpanMethods inherited from interface org.apache.hadoop.fs.store.audit.AuditSpanSource
createSpanMethods inherited from interface org.apache.hadoop.fs.s3a.audit.AWSAuditEventCallbacks
getOperationName, getSpanId, requestCreatedMethods 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, onExecutionFailureMethods 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
-
getAuditor
OperationAuditor getAuditor()Get the auditor; valid once initialized.- Returns:
- the auditor.
-
createExecutionInterceptors
List<software.amazon.awssdk.core.interceptor.ExecutionInterceptor> createExecutionInterceptors() throws IOExceptionCreate the execution interceptor(s) for this audit service. The list returned is mutable; new interceptors may be added.- Returns:
- list of interceptors for the SDK.
- Throws:
IOException- failure.
-
createTransferListener
software.amazon.awssdk.transfer.s3.progress.TransferListener createTransferListener()Return a transfer callback which fixes the active span context to be that in which the transfer listener was created. This can be used to audit the creation of the multipart upload initiation request which the transfer manager makes when a file to be copied is split up. This must be invoked/used within the active span.- Returns:
- a transfer listener.
-
checkAccess
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
-
setAuditFlags
Update audit flags, especially the out of span rejection option.- Parameters:
flags- audit flags.
-