public enum Status extends java.lang.Enum<Status>
Element
. The Status indicates to PlanManager
s how to handle Plan
elements. For
a Step
the normal progression of states is:
PENDING --> PREPARED --> STARTING --> COMPLETE
When something goes wrong, and a retry is desirable returning to PENDING from PREPARED or STARTING indicates that an
Element
should be restarted. COMPLETE is a terminal state which should not be changed, once it is reached
for any given processing of an Element
.
The ERROR state indicates that the initial construction of the Element
failed. This normally occurs when
an invalidation configuration is attempted. For example, changing the disk size specification in a TaskSpec is
generally not a legal operation so attempting to create a Step
Element
to accomplish this work would
result in a Step
with an ERROR state.
The WAITING is a special state only used to show propagating effect of interrupted elements. It indicates that
either current Element
is interrupted or at least one of its children is interrupted. It is only returned by
PlanUtils.getStatus(). Status will never set to WAITING and should never be comparing whether it is WAITING or not.
Internally, interrupt is a separate state, and isInterrupted() call is used to check whether an Element
is
interrupted or not.Enum Constant and Description |
---|
COMPLETE
Execution has completed.
|
ERROR
Execution experienced an error.
|
IN_PROGRESS
Only returned by Phase and Plan getStatus, to state that at least one child is complete and at
least one child is in progress (either PENDING or PREPARED).
|
PENDING
Execution is waiting for suitable offers.
|
PREPARED
The Element has been evaluated, and any Tasks relevant to it have been killed if necessary.
|
STARTED
Execution has performed
org.apache.mesos.Protos.Offer.Operation s and has received feedback, but not all
success requiremens (e.g. |
STARTING
Execution has performed
org.apache.mesos.Protos.Offer.Operation s and is waiting to determine the success
of those Operations. |
WAITING
Execution has been interrupted.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRunning()
Status is in one of the running states.
|
static Status |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Status[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Status ERROR
public static final Status WAITING
public static final Status PENDING
public static final Status PREPARED
public static final Status STARTING
org.apache.mesos.Protos.Offer.Operation
s and is waiting to determine the success
of those Operations.public static final Status STARTED
org.apache.mesos.Protos.Offer.Operation
s and has received feedback, but not all
success requiremens (e.g. readiness checks) have been satisfied.public static final Status COMPLETE
public static final Status IN_PROGRESS
public static Status[] values()
for (Status c : Status.values()) System.out.println(c);
public static Status valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isRunning()