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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintvoiddestroy()longlongcom.google.common.util.concurrent.ListenableFuture<Void> getInfo()longintlongbooleanbooleancom.google.common.util.concurrent.ListenableFuture<Void> process()voidUpdates the task level priority to be greater than or equal to the minimum priority within that level.voidsetReady()toString()booleanUpdates the (potentially stale) priority value cached in this object.
-
Field Details
-
SPLIT_RUN_QUANTA
public static final io.airlift.units.Duration SPLIT_RUN_QUANTA
-
-
Method Details
-
getTaskHandle
-
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
-
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
- Specified by:
compareToin interfaceComparable<PrioritizedSplitRunner>
-
getSplitId
public int getSplitId() -
getPriority
-
getInfo
-
toString
-