Class PrioritizedSplitRunner

java.lang.Object
io.trino.execution.executor.timesharing.PrioritizedSplitRunner
All Implemented Interfaces:
Comparable<PrioritizedSplitRunner>

public final class PrioritizedSplitRunner extends Object implements Comparable<PrioritizedSplitRunner>
  • Field Details

    • SPLIT_RUN_QUANTA

      public static final io.airlift.units.Duration SPLIT_RUN_QUANTA
  • Method Details

    • getTaskHandle

      public TimeSharingTaskHandle getTaskHandle()
    • getFinishedFuture

      public com.google.common.util.concurrent.ListenableFuture<Void> getFinishedFuture()
    • isDestroyed

      public boolean isDestroyed()
    • destroy

      public void destroy()
    • getCreatedNanos

      public long getCreatedNanos()
    • isFinished

      public boolean isFinished()
    • getScheduledNanos

      public long getScheduledNanos()
    • getCpuTimeNanos

      public long getCpuTimeNanos()
    • getWaitNanos

      public long getWaitNanos()
    • process

      public com.google.common.util.concurrent.ListenableFuture<Void> process()
    • markFailed

      public void markFailed(Throwable cause)
    • setReady

      public void setReady()
    • updateLevelPriority

      public boolean updateLevelPriority()
      Updates the (potentially stale) priority value cached in this object. This should be called when this object is outside the queue.
      Returns:
      true if the level changed.
    • resetLevelPriority

      public void resetLevelPriority()
      Updates the task level priority to be greater than or equal to the minimum priority within that level. This ensures that tasks that spend time blocked do not return and starve already-running tasks. Also updates the cached priority object.
    • compareTo

      public int compareTo(PrioritizedSplitRunner o)
      Specified by:
      compareTo in interface Comparable<PrioritizedSplitRunner>
    • getSplitId

      public int getSplitId()
    • getPriority

      public Priority getPriority()
    • getInfo

      public String getInfo()
    • toString

      public String toString()
      Overrides:
      toString in class Object