Class FailureHandlingResultSnapshot
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.exceptionhistory.FailureHandlingResultSnapshot
-
public class FailureHandlingResultSnapshot extends Object
FailureHandlingResultSnapshot
creates a snapshot of aFailureHandlingResult
providing the actualExecutions
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FailureHandlingResultSnapshot
create(FailureHandlingResult failureHandlingResult, Function<ExecutionVertexID,Collection<Execution>> currentExecutionsLookup)
Creates aFailureHandlingResultSnapshot
based on the passedFailureHandlingResult
andExecutionVertices
.Set<Execution>
getConcurrentlyFailedExecution()
AllExecutions
that 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.Throwable
getRootCause()
The actual failure that is handled.Optional<Execution>
getRootCauseExecution()
Returns theExecution
that handled the root cause for this failure.long
getTimestamp()
The time the failure occurred.boolean
isRootCause()
-
-
-
Method Detail
-
create
public static FailureHandlingResultSnapshot create(FailureHandlingResult failureHandlingResult, Function<ExecutionVertexID,Collection<Execution>> currentExecutionsLookup)
Creates aFailureHandlingResultSnapshot
based on the passedFailureHandlingResult
andExecutionVertices
.- Parameters:
failureHandlingResult
- TheFailureHandlingResult
that is used for extracting the failure information.currentExecutionsLookup
- The look-up function for retrieving all the currentExecution
instances for a givenExecutionVertexID
.- Returns:
- The
FailureHandlingResultSnapshot
.
-
getRootCauseExecution
public Optional<Execution> getRootCauseExecution()
Returns theExecution
that handled the root cause for this failure. An emptyOptional
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()
AllExecutions
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.
-
-