public class FailureHandlingResult extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
canRestart()
Returns whether the restarting can be conducted.
|
Throwable |
getError()
Returns reason why the restarting cannot be conducted.
|
long |
getRestartDelayMS()
Returns the delay before the restarting.
|
Set<ExecutionVertexID> |
getVerticesToRestart()
Returns the tasks to restart.
|
boolean |
isGlobalFailure()
Checks if this failure was a global failure, i.e., coming from a "safety net" failover that
involved all tasks and should reset also components like the coordinators.
|
static FailureHandlingResult |
restartable(Set<ExecutionVertexID> verticesToRestart,
long restartDelayMS,
boolean globalFailure)
Creates a result of a set of tasks to restart to recover from the failure.
|
static FailureHandlingResult |
unrecoverable(Throwable error,
boolean globalFailure)
Creates a result that the failure is not recoverable and no restarting should be conducted.
|
public Set<ExecutionVertexID> getVerticesToRestart()
public long getRestartDelayMS()
public Throwable getError()
public boolean canRestart()
public boolean isGlobalFailure()
public static FailureHandlingResult restartable(Set<ExecutionVertexID> verticesToRestart, long restartDelayMS, boolean globalFailure)
The result can be flagged to be from a global failure triggered by the scheduler, rather than from the failure of an individual task.
verticesToRestart
- containing task vertices to restart to recover from the failurerestartDelayMS
- indicate a delay before conducting the restartpublic static FailureHandlingResult unrecoverable(Throwable error, boolean globalFailure)
The result can be flagged to be from a global failure triggered by the scheduler, rather than from the failure of an individual task.
error
- reason why the failure is not recoverableCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.