Package io.prestosql.execution
Enum TaskState
- java.lang.Object
-
- java.lang.Enum<TaskState>
-
- io.prestosql.execution.TaskState
-
- All Implemented Interfaces:
Serializable
,Comparable<TaskState>
public enum TaskState extends Enum<TaskState>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABORTED
Task was aborted due to a failure in the query.CANCELED
Task was canceled by a user.FAILED
Task execution failed.FINISHED
Task has finished executing and all output has been consumed.FLUSHING
Task has finished executing and output is left to be consumed.PLANNED
Task is planned but has not been scheduled yet.RUNNING
Task is running.
-
Field Summary
Fields Modifier and Type Field Description static Set<TaskState>
TERMINAL_TASK_STATES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDone()
Is this a terminal state.static TaskState
valueOf(String name)
Returns the enum constant of this type with the specified name.static TaskState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PLANNED
public static final TaskState PLANNED
Task is planned but has not been scheduled yet. A task will be in the planned state until, the dependencies of the task have begun producing output.
-
RUNNING
public static final TaskState RUNNING
Task is running.
-
FLUSHING
public static final TaskState FLUSHING
Task has finished executing and output is left to be consumed. In this state, there will be no new drivers, the existing drivers have finished and the output buffer of the task is at-least in a 'no-more-pages' state.
-
FINISHED
public static final TaskState FINISHED
Task has finished executing and all output has been consumed.
-
CANCELED
public static final TaskState CANCELED
Task was canceled by a user.
-
ABORTED
public static final TaskState ABORTED
Task was aborted due to a failure in the query. The failure was not in this task.
-
FAILED
public static final TaskState FAILED
Task execution failed.
-
-
Method Detail
-
values
public static TaskState[] 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 (TaskState c : TaskState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TaskState 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
-
isDone
public boolean isDone()
Is this a terminal state.
-
-