public final class AuditIntegration extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
attachSpanToRequest(software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes,
AuditSpanS3A span)
Attach a span to the execution attributes.
|
static boolean |
containsAuditException(Exception exception) |
static OperationAuditor |
createAndInitAuditor(org.apache.hadoop.conf.Configuration conf,
String key,
OperationAuditorOptions options)
Create and initialize an audit service.
|
static AuditManagerS3A |
createAndStartAuditManager(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.statistics.impl.IOStatisticsStore iostatistics)
Create and start an audit manager.
|
static IOException |
maybeTranslateAuditException(String path,
Exception exception)
Translate an exception if it or its inner exception is an
AuditFailureException. |
static AuditSpanS3A |
retrieveAttachedSpan(software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes)
Get the span from the execution attributes.
|
static AuditManagerS3A |
stubAuditManager()
Return a stub audit manager.
|
static IOException |
translateAuditException(String path,
AuditFailureException exception)
Translate an audit exception.
|
public static AuditManagerS3A createAndStartAuditManager(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.statistics.impl.IOStatisticsStore iostatistics)
conf - configurationiostatistics - IOStatistics source.public static AuditManagerS3A stubAuditManager()
public static OperationAuditor createAndInitAuditor(org.apache.hadoop.conf.Configuration conf, String key, OperationAuditorOptions options) throws IOException
conf - configuration to read the key from and to use to init
the service.key - key containing the classnameoptions - options to initialize with.IOException - failure to initialise.public static AuditSpanS3A retrieveAttachedSpan(software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes)
executionAttributes - the execution attributespublic static void attachSpanToRequest(software.amazon.awssdk.core.interceptor.ExecutionAttributes executionAttributes,
AuditSpanS3A span)
executionAttributes - the execution attributesspan - span to attachpublic static IOException translateAuditException(String path, AuditFailureException exception)
path - path of operation.exception - exceptionpublic static IOException maybeTranslateAuditException(String path, Exception exception)
AuditFailureException.
If this condition is not met, null is returned.path - path of operation.exception - exceptionpublic static boolean containsAuditException(Exception exception)
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.