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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields inherited from class org.apache.hadoop.fs.s3a.audit.impl.AbstractOperationAuditor
BASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddAttribute(String key, String value) Add an attribute.createSpan(String operation, String path1, String path2) Get the last header used.Get the unbonded span to use after deactivating an active span.protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) Service init, look for jobID and attach as an attribute in log entries.toString()Methods inherited from class org.apache.hadoop.fs.s3a.audit.impl.AbstractOperationAuditor
auditorFlagsChanged, createSpanID, getAuditorFlags, getAuditorId, getIOStatistics, getOptions, init, isRejectOutOfSpan, setAuditFlags, setRejectOutOfSpanMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, serviceStop, setConfig, start, stop, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.fs.s3a.audit.OperationAuditor
checkAccess, noteSpanReferenceLostMethods inherited from interface org.apache.hadoop.service.Service
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
-
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
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:
serviceInitin classAbstractOperationAuditor- Parameters:
conf- configuration- Throws:
Exception- failure
-
toString
- Overrides:
toStringin classorg.apache.hadoop.service.AbstractService
-
createSpan
-
addAttribute
Add an attribute.- Parameters:
key- keyvalue- value
-
getUnbondedSpan
Description copied from interface:OperationAuditorGet the unbonded span to use after deactivating an active span.- Returns:
- a span.
-
getLastHeader
Get the last header used.- Returns:
- the last referrer header generated.
-