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 Details

  • Constructor Details

    • FailureEnricherUtils

      public FailureEnricherUtils()
  • Method Details

    • getFailureEnrichers

      public static Collection<org.apache.flink.core.failure.FailureEnricher> getFailureEnrichers(org.apache.flink.configuration.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, org.apache.flink.core.failure.FailureEnricher.Context context, Executor mainThreadExecutor, Collection<org.apache.flink.core.failure.FailureEnricher> failureEnrichers)
      Enriches a Throwable by returning the merged label output of a Set of FailureEnrichers.
      Parameters:
      cause - the Throwable to label
      context - the context of the Throwable
      mainThreadExecutor - the executor to complete the enricher labeling on
      failureEnrichers - a collection of FailureEnrichers to enrich the context with
      Returns:
      a CompletableFuture that will complete with a map of labels