Class StageStateMachine


  • @ThreadSafe
    public class StageStateMachine
    extends Object
    • Method Detail

      • getStageId

        public StageId getStageId()
      • getSession

        public Session getSession()
      • addStateChangeListener

        public void addStateChangeListener​(StateMachine.StateChangeListener<StageState> stateChangeListener)
        Listener is always notified asynchronously using a dedicated notification thread pool so, care should be taken to avoid leaking this when adding a listener in a constructor. Additionally, it is possible notifications are observed out of order due to the asynchronous execution.
      • transitionToScheduling

        public boolean transitionToScheduling()
      • transitionToSchedulingSplits

        public boolean transitionToSchedulingSplits()
      • transitionToScheduled

        public boolean transitionToScheduled()
      • transitionToRunning

        public boolean transitionToRunning()
      • transitionToFlushing

        public boolean transitionToFlushing()
      • transitionToFinished

        public boolean transitionToFinished()
      • transitionToCanceled

        public boolean transitionToCanceled()
      • transitionToAborted

        public boolean transitionToAborted()
      • transitionToFailed

        public boolean transitionToFailed​(Throwable throwable)
      • addFinalStageInfoListener

        public void addFinalStageInfoListener​(StateMachine.StateChangeListener<StageInfo> finalStatusListener)
        Add a listener for the final stage info. This notification is guaranteed to be fired only once. Listener is always notified asynchronously using a dedicated notification thread pool so, care should be taken to avoid leaking this when adding a listener in a constructor. Additionally, it is possible notifications are observed out of order due to the asynchronous execution.
      • setAllTasksFinal

        public void setAllTasksFinal​(Iterable<TaskInfo> finalTaskInfos)
      • getUserMemoryReservation

        public long getUserMemoryReservation()
      • getTotalMemoryReservation

        public long getTotalMemoryReservation()
      • updateMemoryUsage

        public void updateMemoryUsage​(long deltaUserMemoryInBytes,
                                      long deltaRevocableMemoryInBytes,
                                      long deltaTotalMemoryInBytes)
      • recordGetSplitTime

        public void recordGetSplitTime​(long startNanos)