Package org.apache.flink.api.common
Enum JobStatus
- java.lang.Object
-
- java.lang.Enum<JobStatus>
-
- org.apache.flink.api.common.JobStatus
-
- All Implemented Interfaces:
Serializable
,Comparable<JobStatus>
@PublicEvolving public enum JobStatus extends Enum<JobStatus>
Possible states of a job once it has been accepted by the dispatcher.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELED
Job has been cancelled.CANCELLING
Job is being cancelled.CREATED
Job is newly created, no task has started to run.FAILED
The job has failed with a non-recoverable task failure.FAILING
The job has failed and is currently waiting for the cleanup to complete.FINISHED
All of the job's tasks have successfully finished.INITIALIZING
The job has been received by the Dispatcher, and is waiting for the job manager to receive leadership and to be created.RECONCILING
The job is currently reconciling and waits for task execution report to recover state.RESTARTING
The job is currently undergoing a reset and total restart.RUNNING
Some tasks are scheduled or running, some may be pending, some may be finished.SUSPENDED
The job has been suspended which means that it has been stopped but not been removed from a potential HA job store.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isGloballyTerminalState()
Checks whether this state is globally terminal.boolean
isTerminalState()
Checks whether this state is locally terminal.static JobStatus
valueOf(String name)
Returns the enum constant of this type with the specified name.static JobStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INITIALIZING
public static final JobStatus INITIALIZING
The job has been received by the Dispatcher, and is waiting for the job manager to receive leadership and to be created.
-
CREATED
public static final JobStatus CREATED
Job is newly created, no task has started to run.
-
RUNNING
public static final JobStatus RUNNING
Some tasks are scheduled or running, some may be pending, some may be finished.
-
FAILING
public static final JobStatus FAILING
The job has failed and is currently waiting for the cleanup to complete.
-
FAILED
public static final JobStatus FAILED
The job has failed with a non-recoverable task failure.
-
CANCELLING
public static final JobStatus CANCELLING
Job is being cancelled.
-
CANCELED
public static final JobStatus CANCELED
Job has been cancelled.
-
FINISHED
public static final JobStatus FINISHED
All of the job's tasks have successfully finished.
-
RESTARTING
public static final JobStatus RESTARTING
The job is currently undergoing a reset and total restart.
-
SUSPENDED
public static final JobStatus SUSPENDED
The job has been suspended which means that it has been stopped but not been removed from a potential HA job store.
-
RECONCILING
public static final JobStatus RECONCILING
The job is currently reconciling and waits for task execution report to recover state.
-
-
Method Detail
-
values
public static JobStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JobStatus c : JobStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JobStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isGloballyTerminalState
public boolean isGloballyTerminalState()
Checks whether this state is globally terminal. A globally terminal job is complete and cannot fail any more and will not be restarted or recovered by another standby master node.When a globally terminal state has been reached, all recovery data for the job is dropped from the high-availability services.
- Returns:
- True, if this job status is globally terminal, false otherwise.
-
isTerminalState
public boolean isTerminalState()
Checks whether this state is locally terminal. Locally terminal refers to the state of a job's execution graph within an executing JobManager. If the execution graph is locally terminal, the JobManager will not continue executing or recovering the job.The only state that is locally terminal, but not globally terminal is
SUSPENDED
, which is typically entered when the executing JobManager loses its leader status.- Returns:
- True, if this job status is terminal, false otherwise.
-
-