@ThreadSafe public class StageStateMachine extends Object
| Constructor and Description |
|---|
StageStateMachine(StageId stageId,
URI location,
Session session,
PlanFragment fragment,
ExecutorService executor,
SplitSchedulerStats schedulerStats) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFinalStageInfoListener(StateMachine.StateChangeListener<StageInfo> finalStatusListener)
Add a listener for the final stage info.
|
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. |
BasicStageStats |
getBasicStageStats(Supplier<Iterable<TaskInfo>> taskInfosSupplier) |
PlanFragment |
getFragment() |
URI |
getLocation() |
Session |
getSession() |
StageId |
getStageId() |
StageInfo |
getStageInfo(Supplier<Iterable<TaskInfo>> taskInfosSupplier) |
StageState |
getState() |
long |
getTotalMemoryReservation() |
long |
getUserMemoryReservation() |
void |
recordGetSplitTime(long startNanos) |
void |
setAllTasksFinal(Iterable<TaskInfo> finalTaskInfos) |
String |
toString() |
boolean |
transitionToAborted() |
boolean |
transitionToCanceled() |
boolean |
transitionToFailed(Throwable throwable) |
boolean |
transitionToFinished() |
boolean |
transitionToRunning() |
boolean |
transitionToScheduled() |
boolean |
transitionToScheduling() |
boolean |
transitionToSchedulingSplits() |
void |
updateMemoryUsage(long deltaUserMemoryInBytes,
long deltaRevocableMemoryInBytes,
long deltaTotalMemoryInBytes) |
public StageStateMachine(StageId stageId, URI location, Session session, PlanFragment fragment, ExecutorService executor, SplitSchedulerStats schedulerStats)
public StageId getStageId()
public URI getLocation()
public Session getSession()
public StageState getState()
public PlanFragment getFragment()
public void addStateChangeListener(StateMachine.StateChangeListener<StageState> stateChangeListener)
this when adding a listener in a constructor. Additionally, it is
possible notifications are observed out of order due to the asynchronous execution.public boolean transitionToScheduling()
public boolean transitionToSchedulingSplits()
public boolean transitionToScheduled()
public boolean transitionToRunning()
public boolean transitionToFinished()
public boolean transitionToCanceled()
public boolean transitionToAborted()
public boolean transitionToFailed(Throwable throwable)
public void addFinalStageInfoListener(StateMachine.StateChangeListener<StageInfo> finalStatusListener)
this when adding a listener in a constructor. Additionally, it is
possible notifications are observed out of order due to the asynchronous execution.public long getUserMemoryReservation()
public long getTotalMemoryReservation()
public void updateMemoryUsage(long deltaUserMemoryInBytes,
long deltaRevocableMemoryInBytes,
long deltaTotalMemoryInBytes)
public BasicStageStats getBasicStageStats(Supplier<Iterable<TaskInfo>> taskInfosSupplier)
public void recordGetSplitTime(long startNanos)
Copyright © 2012–2019. All rights reserved.