public class DummySpeculativeExecutionHandler extends Object implements SpeculativeExecutionHandler
SpeculativeExecutionHandler
.Constructor and Description |
---|
DummySpeculativeExecutionHandler() |
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.
|
public void init(ExecutionGraph executionGraph, ComponentMainThreadExecutor mainThreadExecutor, MetricGroup metricGroup)
SpeculativeExecutionHandler
init
in interface SpeculativeExecutionHandler
public void stopSlowTaskDetector()
SpeculativeExecutionHandler
stopSlowTaskDetector
in interface SpeculativeExecutionHandler
public void notifyTaskFinished(Execution execution, java.util.function.Function<ExecutionVertexID,CompletableFuture<?>> cancelPendingExecutionsFunction)
SpeculativeExecutionHandler
notifyTaskFinished
in interface SpeculativeExecutionHandler
execution
- the execution that has finishedcancelPendingExecutionsFunction
- the function to cancel pending executionspublic void notifyTaskFailed(Execution execution)
SpeculativeExecutionHandler
notifyTaskFailed
in interface SpeculativeExecutionHandler
execution
- the execution that has failedpublic boolean handleTaskFailure(Execution failedExecution, @Nullable Throwable error, java.util.function.BiConsumer<Execution,Throwable> handleLocalExecutionAttemptFailure)
SpeculativeExecutionHandler
handleTaskFailure
in interface SpeculativeExecutionHandler
failedExecution
- the execution that failederror
- the error that caused the failure, if availablehandleLocalExecutionAttemptFailure
- a consumer that handles local execution attempt
failurepublic void resetForNewExecution(ExecutionVertexID executionVertexId)
SpeculativeExecutionHandler
resetForNewExecution
in interface SpeculativeExecutionHandler
executionVertexId
- the ID of the execution vertex to resetCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.