public class FailureEnricherUtils extends Object
Modifier and Type | Field and Description |
---|---|
static CompletableFuture<Map<String,String>> |
EMPTY_FAILURE_LABELS |
Constructor and Description |
---|
FailureEnricherUtils() |
Modifier and Type | Method and Description |
---|---|
static Collection<FailureEnricher> |
getFailureEnrichers(Configuration configuration)
Returns a set of validated FailureEnrichers for a given configuration.
|
static CompletableFuture<Map<String,String>> |
labelFailure(Throwable cause,
FailureEnricher.Context context,
Executor mainThreadExecutor,
Collection<FailureEnricher> failureEnrichers)
Enriches a Throwable by returning the merged label output of a Set of FailureEnrichers.
|
public static final CompletableFuture<Map<String,String>> EMPTY_FAILURE_LABELS
public static Collection<FailureEnricher> getFailureEnrichers(Configuration configuration)
configuration
- the configuration for the jobpublic static CompletableFuture<Map<String,String>> labelFailure(Throwable cause, FailureEnricher.Context context, Executor mainThreadExecutor, Collection<FailureEnricher> failureEnrichers)
cause
- the Throwable to labelcontext
- the context of the ThrowablemainThreadExecutor
- the executor to complete the enricher labeling onfailureEnrichers
- a collection of FailureEnrichers to enrich the context withCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.