public interface SpeculativeExecutionHandler
Modifier and Type | Method and Description |
---|---|
boolean |
handleTaskFailure(Execution failedExecution,
Throwable error,
java.util.function.BiConsumer<Execution,Throwable> handleLocalExecutionAttemptFailure)
Handles a task failure.
|
void |
init(ExecutionGraph executionGraph,
ComponentMainThreadExecutor mainThreadExecutor,
MetricGroup metricGroup)
Initial speculative execution handler.
|
void |
notifyTaskFailed(Execution execution)
Notifies that a task has failed its execution.
|
void |
notifyTaskFinished(Execution execution,
java.util.function.Function<ExecutionVertexID,CompletableFuture<?>> cancelPendingExecutionsFunction)
Notifies that a task has finished its execution.
|
void |
resetForNewExecution(ExecutionVertexID executionVertexId)
Resets the state of the component for a new execution of a specific execution vertex.
|
void |
stopSlowTaskDetector()
Stops the slow task detector.
|
void init(ExecutionGraph executionGraph, ComponentMainThreadExecutor mainThreadExecutor, MetricGroup metricGroup)
void stopSlowTaskDetector()
void notifyTaskFinished(Execution execution, java.util.function.Function<ExecutionVertexID,CompletableFuture<?>> cancelPendingExecutionsFunction)
execution
- the execution that has finishedcancelPendingExecutionsFunction
- the function to cancel pending executionsvoid notifyTaskFailed(Execution execution)
execution
- the execution that has failedboolean handleTaskFailure(Execution failedExecution, @Nullable Throwable error, java.util.function.BiConsumer<Execution,Throwable> handleLocalExecutionAttemptFailure)
failedExecution
- the execution that failederror
- the error that caused the failure, if availablehandleLocalExecutionAttemptFailure
- a consumer that handles local execution attempt
failurevoid resetForNewExecution(ExecutionVertexID executionVertexId)
executionVertexId
- the ID of the execution vertex to resetCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.