Class FailureHandlingResultSnapshot
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.exceptionhistory.FailureHandlingResultSnapshot
-
public class FailureHandlingResultSnapshot extends Object
FailureHandlingResultSnapshotcreates a snapshot of aFailureHandlingResultproviding the actualExecutions.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FailureHandlingResultSnapshotcreate(FailureHandlingResult failureHandlingResult, Function<ExecutionVertexID,Collection<Execution>> currentExecutionsLookup)Creates aFailureHandlingResultSnapshotbased on the passedFailureHandlingResultandExecutionVertices.Set<Execution>getConcurrentlyFailedExecution()AllExecutionsthat failed and are planned to be restarted as part of this failure handling.CompletableFuture<Map<String,String>>getFailureLabels()Returns the labels future associated with the failure.ThrowablegetRootCause()The actual failure that is handled.Optional<Execution>getRootCauseExecution()Returns theExecutionthat handled the root cause for this failure.longgetTimestamp()The time the failure occurred.booleanisRootCause()
-
-
-
Method Detail
-
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
public Optional<Execution> 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
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()
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.
-
-