public class DefaultSpeculativeExecutionHandler extends Object implements SpeculativeExecutionHandler, SlowTaskDetectorListener
SpeculativeExecutionHandler.| 构造器和说明 |
|---|
DefaultSpeculativeExecutionHandler(org.apache.flink.configuration.Configuration jobMasterConfiguration,
BlocklistOperations blocklistOperations,
Function<ExecutionVertexID,ExecutionVertex> executionVertexRetriever,
Supplier<Map<ExecutionAttemptID,Execution>> registerExecutionsSupplier,
BiConsumer<List<Execution>,Collection<ExecutionVertexID>> allocateSlotsAndDeployFunction,
org.slf4j.Logger log) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
handleTaskFailure(Execution failedExecution,
Throwable error,
BiConsumer<Execution,Throwable> handleLocalExecutionAttemptFailure)
Handles a task failure.
|
void |
init(ExecutionGraph executionGraph,
org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor,
org.apache.flink.metrics.MetricGroup metricGroup)
Initial speculative execution handler.
|
void |
notifySlowTasks(Map<ExecutionVertexID,Collection<ExecutionAttemptID>> slowTasks)
Notify detected slow tasks.
|
void |
notifyTaskFailed(Execution execution)
Notifies that a task has failed its execution.
|
void |
notifyTaskFinished(Execution execution,
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 DefaultSpeculativeExecutionHandler(org.apache.flink.configuration.Configuration jobMasterConfiguration,
BlocklistOperations blocklistOperations,
Function<ExecutionVertexID,ExecutionVertex> executionVertexRetriever,
Supplier<Map<ExecutionAttemptID,Execution>> registerExecutionsSupplier,
BiConsumer<List<Execution>,Collection<ExecutionVertexID>> allocateSlotsAndDeployFunction,
org.slf4j.Logger log)
public void init(ExecutionGraph executionGraph, org.apache.flink.runtime.concurrent.ComponentMainThreadExecutor mainThreadExecutor, org.apache.flink.metrics.MetricGroup metricGroup)
SpeculativeExecutionHandlerinit 在接口中 SpeculativeExecutionHandlerpublic void stopSlowTaskDetector()
SpeculativeExecutionHandlerpublic void notifyTaskFinished(Execution execution, Function<ExecutionVertexID,CompletableFuture<?>> cancelPendingExecutionsFunction)
SpeculativeExecutionHandlernotifyTaskFinished 在接口中 SpeculativeExecutionHandlerexecution - the execution that has finishedcancelPendingExecutionsFunction - the function to cancel pending executionspublic void notifyTaskFailed(Execution execution)
SpeculativeExecutionHandlernotifyTaskFailed 在接口中 SpeculativeExecutionHandlerexecution - the execution that has failedpublic boolean handleTaskFailure(Execution failedExecution, @Nullable Throwable error, BiConsumer<Execution,Throwable> handleLocalExecutionAttemptFailure)
SpeculativeExecutionHandlerhandleTaskFailure 在接口中 SpeculativeExecutionHandlerfailedExecution - the execution that failederror - the error that caused the failure, if availablehandleLocalExecutionAttemptFailure - a consumer that handles local execution attempt
failurepublic void notifySlowTasks(Map<ExecutionVertexID,Collection<ExecutionAttemptID>> slowTasks)
SlowTaskDetectorListenernotifySlowTasks 在接口中 SlowTaskDetectorListenerslowTasks - the map of execution vertices and their execution attempts which are
detected as slow.public void resetForNewExecution(ExecutionVertexID executionVertexId)
SpeculativeExecutionHandlerresetForNewExecution 在接口中 SpeculativeExecutionHandlerexecutionVertexId - the ID of the execution vertex to resetCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.