/** * Submits a cancel-task command to a specified worker. * * @param jobId the job id * @param taskId the task id * @param workerId the worker id */ public synchronized void submitCancelTaskCommand(long jobId, int taskId, long workerId) { CancelTaskCommand.Builder cancelTaskCommand = CancelTaskCommand.newBuilder(); cancelTaskCommand.setJobId(jobId); cancelTaskCommand.setTaskId(taskId); JobCommand.Builder command = JobCommand.newBuilder(); command.setCancelTaskCommand(cancelTaskCommand); if (!mWorkerIdToPendingCommands.containsKey(workerId)) { mWorkerIdToPendingCommands.put(workerId, Lists.<JobCommand>newArrayList()); } mWorkerIdToPendingCommands.get(workerId).add(command.build()); }
public Builder mergeFrom(alluxio.grpc.CancelTaskCommand other) { if (other == alluxio.grpc.CancelTaskCommand.getDefaultInstance()) return this; if (other.hasJobId()) { setJobId(other.getJobId()); } if (other.hasTaskId()) { setTaskId(other.getTaskId()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }