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(Execution failedExecution,
Throwable cause,
long timestamp)
Return result of failure handling.
|
FailureHandlingResult |
getGlobalFailureHandlingResult(Throwable cause,
long timestamp)
Return result of failure handling on a global failure.
|
long |
getNumberOfRestarts() |
static boolean |
isUnrecoverableError(Throwable cause) |
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(Execution failedExecution, Throwable cause, long timestamp)
failedExecution
- is the failed executioncause
- of the task failuretimestamp
- of the task failurepublic FailureHandlingResult getGlobalFailureHandlingResult(Throwable cause, long timestamp)
cause
- of the task failuretimestamp
- of the task failurepublic static boolean isUnrecoverableError(Throwable cause)
public long getNumberOfRestarts()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.