public interface Step extends Element, Interruptible
Phase. The Step is the base unit of a set of
tasks to perform, such as launching a Task, updating a Task, or reconciling Mesos state with
Framework state. A Step may be in one of five states: PENDING, PREPARED, STARTING, COMPLETE, or ERROR.
See Plan docs for more background.| Modifier and Type | Method and Description |
|---|---|
default java.lang.String |
getDisplayStatus()
Returns a user-facing display status of this step, which may provide additional context on the work being
performed beyond the underlying progress
Status returned by Element.getStatus(). |
default java.lang.String |
getMessage()
Returns a reasonable user-visible status message.
|
java.util.Optional<PodInstanceRequirement> |
getPodInstanceRequirement()
Return the pod instance that this Step intends to work on.
|
default boolean |
isAssetDirty()
Reports whether the Asset associated with this Step is dirty.
|
default boolean |
isEligible(java.util.Collection<PodInstanceRequirement> dirtyAssets)
Indicates whether this Element is capable of being started.
|
java.util.Optional<PodInstanceRequirement> |
start()
Starts the Step, whose
Status should be Status.PENDING. |
void |
updateOfferStatus(java.util.Collection<OfferRecommendation> recommendations)
Notifies the Step whether the
PodInstanceRequirement previously returned by
start() has been successfully accepted/fulfilled. |
forceComplete, getErrors, getId, getName, getStatus, hasErrors, isComplete, isPending, isPrepared, isRunning, isStarted, isStarting, restart, update, updateParametersinterrupt, isInterrupted, proceedjava.util.Optional<PodInstanceRequirement> start()
Status should be Status.PENDING. Returns an
PodInstanceRequirement, or an empty Optional if obtaining/updating resource requirements are not
applicable to the Step. This will continue to be called for as long as Element.isPending() returns
true.#updateOfferStatus(Collection)} which returns the outcome of
the {@link PodInstanceRequirement} java.util.Optional<PodInstanceRequirement> getPodInstanceRequirement()
void updateOfferStatus(java.util.Collection<OfferRecommendation> recommendations)
PodInstanceRequirement previously returned by
start() has been successfully accepted/fulfilled. The recommendations param is
empty when no offers matching the requirement previously returned by start()
could be found. This is only called if start() returned a non-empty
PodInstanceRequirement.default java.lang.String getDisplayStatus()
Status returned by Element.getStatus().default boolean isAssetDirty()
default boolean isEligible(java.util.Collection<PodInstanceRequirement> dirtyAssets)
ElementisEligible in interface Elementdefault java.lang.String getMessage()
ElementgetMessage in interface Element