Package org.apache.flink.runtime.failure
Class FailureEnricherUtils
- java.lang.Object
-
- org.apache.flink.runtime.failure.FailureEnricherUtils
-
public class FailureEnricherUtils extends Object
Utils class for loading and running pluggable failure enrichers.
-
-
Field Summary
Fields Modifier and Type Field Description static CompletableFuture<Map<String,String>>
EMPTY_FAILURE_LABELS
-
Constructor Summary
Constructors Constructor Description FailureEnricherUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
EMPTY_FAILURE_LABELS
public static final CompletableFuture<Map<String,String>> EMPTY_FAILURE_LABELS
-
-
Method Detail
-
getFailureEnrichers
public static Collection<FailureEnricher> getFailureEnrichers(Configuration configuration)
Returns a set of validated FailureEnrichers for a given configuration.- Parameters:
configuration
- the configuration for the job- Returns:
- a collection of validated FailureEnrichers
-
labelFailure
public 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.- Parameters:
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 with- Returns:
- a CompletableFuture that will complete with a map of labels
-
-