public interface TaskManager
| Modifier and Type | Method and Description |
|---|---|
TaskInfo |
abortTask(TaskId taskId)
Aborts a task.
|
TaskInfo |
abortTaskResults(TaskId taskId,
OutputBuffers.OutputBufferId bufferId)
Aborts a result buffer for a task.
|
void |
acknowledgeTaskResults(TaskId taskId,
OutputBuffers.OutputBufferId bufferId,
long sequenceId)
Acknowledges previously received results.
|
void |
addStateChangeListener(TaskId taskId,
StateMachine.StateChangeListener<TaskState> stateChangeListener)
Adds a state change listener to the specified task.
|
TaskInfo |
cancelTask(TaskId taskId)
Cancels a task.
|
List<TaskInfo> |
getAllTaskInfo()
Gets all of the currently tracked tasks.
|
TaskInfo |
getTaskInfo(TaskId taskId)
Gets the info for the specified task.
|
com.google.common.util.concurrent.ListenableFuture<TaskInfo> |
getTaskInfo(TaskId taskId,
TaskState currentState)
Gets future info for the task after the state changes from
current state. |
String |
getTaskInstanceId(TaskId taskId)
Gets the unique instance id of a task.
|
com.google.common.util.concurrent.ListenableFuture<BufferResult> |
getTaskResults(TaskId taskId,
OutputBuffers.OutputBufferId bufferId,
long startingSequenceId,
io.airlift.units.DataSize maxSize)
Gets results from a task either immediately or in the future.
|
TaskStatus |
getTaskStatus(TaskId taskId)
Gets the status for the specified task.
|
com.google.common.util.concurrent.ListenableFuture<TaskStatus> |
getTaskStatus(TaskId taskId,
TaskState currentState)
Gets future status for the task after the state changes from
current state. |
void |
updateMemoryPoolAssignments(MemoryPoolAssignmentsRequest assignments) |
TaskInfo |
updateTask(Session session,
TaskId taskId,
Optional<PlanFragment> fragment,
List<TaskSource> sources,
OutputBuffers outputBuffers,
OptionalInt totalPartitions)
Updates the task plan, sources and output buffers.
|
List<TaskInfo> getAllTaskInfo()
TaskInfo getTaskInfo(TaskId taskId)
NOTE: this design assumes that only tasks that will eventually exist are queried.
TaskStatus getTaskStatus(TaskId taskId)
com.google.common.util.concurrent.ListenableFuture<TaskInfo> getTaskInfo(TaskId taskId, TaskState currentState)
current state. If the task has not been created yet, an
uninitialized task is created and the future is returned. If the task
is already in a final state, the info is returned immediately.
NOTE: this design assumes that only tasks that will eventually exist are queried.
String getTaskInstanceId(TaskId taskId)
com.google.common.util.concurrent.ListenableFuture<TaskStatus> getTaskStatus(TaskId taskId, TaskState currentState)
current state. If the task has not been created yet, an
uninitialized task is created and the future is returned. If the task
is already in a final state, the status is returned immediately.
NOTE: this design assumes that only tasks that will eventually exist are queried.
void updateMemoryPoolAssignments(MemoryPoolAssignmentsRequest assignments)
TaskInfo updateTask(Session session, TaskId taskId, Optional<PlanFragment> fragment, List<TaskSource> sources, OutputBuffers outputBuffers, OptionalInt totalPartitions)
TaskInfo cancelTask(TaskId taskId)
TaskInfo abortTask(TaskId taskId)
com.google.common.util.concurrent.ListenableFuture<BufferResult> getTaskResults(TaskId taskId, OutputBuffers.OutputBufferId bufferId, long startingSequenceId, io.airlift.units.DataSize maxSize)
NOTE: this design assumes that only tasks and buffers that will eventually exist are queried.
void acknowledgeTaskResults(TaskId taskId, OutputBuffers.OutputBufferId bufferId, long sequenceId)
TaskInfo abortTaskResults(TaskId taskId, OutputBuffers.OutputBufferId bufferId)
NOTE: this design assumes that only tasks and buffers that will eventually exist are queried.
void addStateChangeListener(TaskId taskId, StateMachine.StateChangeListener<TaskState> stateChangeListener)
this when adding a listener in a constructor. Additionally, it is
possible notifications are observed out of order due to the asynchronous execution.Copyright © 2012–2019. All rights reserved.