@ThreadSafe
public final class CommandManager
extends java.lang.Object
| Constructor and Description |
|---|
CommandManager()
Constructs a new
CommandManager. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<JobCommand> |
pollAllPendingCommands(long workerId)
Polls all the pending commands to a worker and removes the commands from the queue.
|
void |
submitCancelTaskCommand(long jobId,
long taskId,
long workerId)
Submits a cancel-task command to a specified worker.
|
void |
submitRunTaskCommand(long jobId,
long taskId,
JobConfig jobConfig,
java.lang.Object taskArgs,
long workerId)
Submits a run-task command to a specified worker.
|
void |
submitSetTaskPoolSizeCommand(long workerId,
int taskPoolSize)
Submits a set thread pool size command to specific worker.
|
public CommandManager()
CommandManager.public void submitRunTaskCommand(long jobId,
long taskId,
JobConfig jobConfig,
java.lang.Object taskArgs,
long workerId)
jobId - the id of the jobtaskId - the id of the taskjobConfig - the job configurationtaskArgs - the arguments passed to the executor on the workerworkerId - the id of the workerpublic void submitCancelTaskCommand(long jobId,
long taskId,
long workerId)
jobId - the job idtaskId - the task idworkerId - the worker idpublic void submitSetTaskPoolSizeCommand(long workerId,
int taskPoolSize)
workerId - the worker idtaskPoolSize - the task pool sizepublic java.util.List<JobCommand> pollAllPendingCommands(long workerId)
workerId - id of the worker to send the commands toCopyright © 2022. All Rights Reserved.