Package io.trino.execution
Class SqlStage
- java.lang.Object
-
- io.trino.execution.SqlStage
-
@ThreadSafe public final class SqlStage extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()voidaddFinalStageInfoListener(StateMachine.StateChangeListener<StageInfo> stateChangeListener)Add a listener for the final stage info.static SqlStagecreateSqlStage(StageId stageId, PlanFragment fragment, Map<PlanNodeId,TableInfo> tables, RemoteTaskFactory remoteTaskFactory, Session session, boolean summarizeTaskInfo, NodeTaskMap nodeTaskMap, Executor executor, SplitSchedulerStats schedulerStats)Optional<RemoteTask>createTask(InternalNode node, int partition, int attempt, Optional<int[]> bucketToPartition, OutputBuffers outputBuffers, com.google.common.collect.Multimap<PlanNodeId,Split> splits, com.google.common.collect.Multimap<PlanNodeId,Lifespan> noMoreSplitsForLifespan, Set<PlanNodeId> noMoreSplits)voidfail(Throwable throwable)voidfinish()BasicStageStatsgetBasicStageStats()PlanFragmentgetFragment()StageIdgetStageId()StageInfogetStageInfo()io.airlift.units.DurationgetTotalCpuTime()longgetTotalMemoryReservation()longgetUserMemoryReservation()voidrecordGetSplitTime(long start)StringtoString()
-
-
-
Method Detail
-
createSqlStage
public static SqlStage createSqlStage(StageId stageId, PlanFragment fragment, Map<PlanNodeId,TableInfo> tables, RemoteTaskFactory remoteTaskFactory, Session session, boolean summarizeTaskInfo, NodeTaskMap nodeTaskMap, Executor executor, SplitSchedulerStats schedulerStats)
-
getStageId
public StageId getStageId()
-
finish
public void finish()
-
abort
public void abort()
-
fail
public void fail(Throwable throwable)
-
addFinalStageInfoListener
public void addFinalStageInfoListener(StateMachine.StateChangeListener<StageInfo> stateChangeListener)
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 leakingthiswhen adding a listener in a constructor. Additionally, it is possible notifications are observed out of order due to the asynchronous execution.
-
getFragment
public PlanFragment getFragment()
-
getUserMemoryReservation
public long getUserMemoryReservation()
-
getTotalMemoryReservation
public long getTotalMemoryReservation()
-
getTotalCpuTime
public io.airlift.units.Duration getTotalCpuTime()
-
getBasicStageStats
public BasicStageStats getBasicStageStats()
-
getStageInfo
public StageInfo getStageInfo()
-
createTask
public Optional<RemoteTask> createTask(InternalNode node, int partition, int attempt, Optional<int[]> bucketToPartition, OutputBuffers outputBuffers, com.google.common.collect.Multimap<PlanNodeId,Split> splits, com.google.common.collect.Multimap<PlanNodeId,Lifespan> noMoreSplitsForLifespan, Set<PlanNodeId> noMoreSplits)
-
recordGetSplitTime
public void recordGetSplitTime(long start)
-
-