Class FailureHandlingResultSnapshot

java.lang.Object
org.apache.flink.runtime.scheduler.exceptionhistory.FailureHandlingResultSnapshot

public class FailureHandlingResultSnapshot extends Object
FailureHandlingResultSnapshot creates a snapshot of a FailureHandlingResult providing the actual Executions.
  • Method Details

    • create

      public static FailureHandlingResultSnapshot create(FailureHandlingResult failureHandlingResult, Function<ExecutionVertexID,Collection<Execution>> currentExecutionsLookup)
      Creates a FailureHandlingResultSnapshot based on the passed FailureHandlingResult and ExecutionVertices.
      Parameters:
      failureHandlingResult - The FailureHandlingResult that is used for extracting the failure information.
      currentExecutionsLookup - The look-up function for retrieving all the current Execution instances for a given ExecutionVertexID.
      Returns:
      The FailureHandlingResultSnapshot.
    • getRootCauseExecution

      public Optional<Execution> getRootCauseExecution()
      Returns the Execution that handled the root cause for this failure. An empty Optional will be returned if it's a global failure.
      Returns:
      The Execution that handled the root cause for this failure.
    • getRootCause

      public Throwable getRootCause()
      The actual failure that is handled.
      Returns:
      The Throwable.
    • getFailureLabels

      public CompletableFuture<Map<String,String>> getFailureLabels()
      Returns the labels future associated with the failure.
      Returns:
      the CompletableFuture map of String labels
    • getTimestamp

      public long getTimestamp()
      The time the failure occurred.
      Returns:
      The time of the failure.
    • getConcurrentlyFailedExecution

      public Set<Execution> getConcurrentlyFailedExecution()
      All Executions that failed and are planned to be restarted as part of this failure handling.
      Returns:
      The concurrently failed Executions.
    • isRootCause

      public boolean isRootCause()
      Returns:
      True means that the current failure is a new attempt, false means that there has been a failure before and has not been tried yet, and the current failure will be merged into the previous attempt, and these merged exceptions will be considered as the concurrent exceptions.