Class FailureHandlingResultSnapshot
java.lang.Object
org.apache.flink.runtime.scheduler.exceptionhistory.FailureHandlingResultSnapshot
FailureHandlingResultSnapshot creates a snapshot of a FailureHandlingResult
providing the actual Executions.-
Method Summary
Modifier and TypeMethodDescriptioncreate(FailureHandlingResult failureHandlingResult, Function<ExecutionVertexID, Collection<Execution>> currentExecutionsLookup) Creates aFailureHandlingResultSnapshotbased on the passedFailureHandlingResultandExecutionVertices.AllExecutionsthat failed and are planned to be restarted as part of this failure handling.Returns the labels future associated with the failure.The actual failure that is handled.Returns theExecutionthat handled the root cause for this failure.longThe time the failure occurred.boolean
-
Method Details
-
create
public static FailureHandlingResultSnapshot create(FailureHandlingResult failureHandlingResult, Function<ExecutionVertexID, Collection<Execution>> currentExecutionsLookup) Creates aFailureHandlingResultSnapshotbased on the passedFailureHandlingResultandExecutionVertices.- Parameters:
failureHandlingResult- TheFailureHandlingResultthat is used for extracting the failure information.currentExecutionsLookup- The look-up function for retrieving all the currentExecutioninstances for a givenExecutionVertexID.- Returns:
- The
FailureHandlingResultSnapshot.
-
getRootCauseExecution
Returns theExecutionthat handled the root cause for this failure. An emptyOptionalwill be returned if it's a global failure.- Returns:
- The
Executionthat handled the root cause for this failure.
-
getRootCause
The actual failure that is handled.- Returns:
- The
Throwable.
-
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
AllExecutionsthat 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.
-