public class ExecutionFailureHandler extends Object
FailureHandlingResult
which contains
tasks to restart to recover from failures.Constructor and Description |
---|
ExecutionFailureHandler(SchedulingTopology schedulingTopology,
FailoverStrategy failoverStrategy,
RestartBackoffTimeStrategy restartBackoffTimeStrategy)
Creates the handler to deal with task failures.
|
Modifier and Type | Method and Description |
---|---|
FailureHandlingResult |
getFailureHandlingResult(ExecutionVertexID failedTask,
Throwable cause)
Return result of failure handling.
|
FailureHandlingResult |
getGlobalFailureHandlingResult(Throwable cause)
Return result of failure handling on a global failure.
|
long |
getNumberOfRestarts() |
public ExecutionFailureHandler(SchedulingTopology schedulingTopology, FailoverStrategy failoverStrategy, RestartBackoffTimeStrategy restartBackoffTimeStrategy)
schedulingTopology
- contains the topology info for failoverfailoverStrategy
- helps to decide tasks to restart on task failuresrestartBackoffTimeStrategy
- helps to decide whether to restart failed tasks and the
restarting delaypublic FailureHandlingResult getFailureHandlingResult(ExecutionVertexID failedTask, Throwable cause)
failedTask
- is the ID of the failed task vertexcause
- of the task failurepublic FailureHandlingResult getGlobalFailureHandlingResult(Throwable cause)
cause
- of the task failurepublic long getNumberOfRestarts()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.