Package io.trino.memory
Class QueryContext
java.lang.Object
io.trino.memory.QueryContext
-
Constructor Summary
ConstructorsConstructorDescriptionQueryContext(QueryId queryId, io.airlift.units.DataSize maxUserMemory, MemoryPool memoryPool, long guaranteedMemory, io.airlift.stats.GcMonitor gcMonitor, Executor notificationExecutor, ScheduledExecutorService yieldExecutor, ScheduledExecutorService timeoutExecutor, io.airlift.units.DataSize maxSpill, SpillSpaceTracker spillSpaceTracker) QueryContext(QueryId queryId, io.airlift.units.DataSize maxUserMemory, MemoryPool memoryPool, io.airlift.stats.GcMonitor gcMonitor, Executor notificationExecutor, ScheduledExecutorService yieldExecutor, ScheduledExecutorService timeoutExecutor, io.airlift.units.DataSize maxSpill, SpillSpaceTracker spillSpaceTracker) -
Method Summary
Modifier and TypeMethodDescription<C,R> R accept(QueryContextVisitor<C, R> visitor, C context) <C,R> List <R> acceptChildren(QueryContextVisitor<C, R> visitor, C context) addTaskContext(TaskStateMachine taskStateMachine, Session session, Runnable notifyStatusChanged, boolean perOperatorCpuTimerEnabled, boolean cpuTimerEnabled) voidfreeSpill(long bytes) longgetTaskContextByTaskId(TaskId taskId) longvoidinitializeMemoryLimits(boolean resourceOverCommit, long maxUserMemory) booleancom.google.common.util.concurrent.ListenableFuture<Void> reserveSpill(long bytes)
-
Constructor Details
-
QueryContext
public QueryContext(QueryId queryId, io.airlift.units.DataSize maxUserMemory, MemoryPool memoryPool, io.airlift.stats.GcMonitor gcMonitor, Executor notificationExecutor, ScheduledExecutorService yieldExecutor, ScheduledExecutorService timeoutExecutor, io.airlift.units.DataSize maxSpill, SpillSpaceTracker spillSpaceTracker) -
QueryContext
public QueryContext(QueryId queryId, io.airlift.units.DataSize maxUserMemory, MemoryPool memoryPool, long guaranteedMemory, io.airlift.stats.GcMonitor gcMonitor, Executor notificationExecutor, ScheduledExecutorService yieldExecutor, ScheduledExecutorService timeoutExecutor, io.airlift.units.DataSize maxSpill, SpillSpaceTracker spillSpaceTracker)
-
-
Method Details
-
isMemoryLimitsInitialized
public boolean isMemoryLimitsInitialized() -
initializeMemoryLimits
public void initializeMemoryLimits(boolean resourceOverCommit, long maxUserMemory) -
getMaxUserMemory
public long getMaxUserMemory() -
getQueryId
-
reserveSpill
-
freeSpill
public void freeSpill(long bytes) -
getMemoryPool
-
getUserMemoryReservation
public long getUserMemoryReservation() -
addTaskContext
public TaskContext addTaskContext(TaskStateMachine taskStateMachine, Session session, Runnable notifyStatusChanged, boolean perOperatorCpuTimerEnabled, boolean cpuTimerEnabled) -
accept
-
acceptChildren
-
getTaskContextByTaskId
-