code: public synchronized void notifyTaskCancellation(long jobId, int taskId) {
      Pair<Long, Integer> id = new Pair<>(jobId, taskId);
      TaskInfo.Builder taskInfo = mUnfinishedTasks.get(id);
      taskInfo.setStatus(Status.CANCELED);
      finishTask(id);
      LOG.info("Task {} for job {} canceled", taskId, jobId);
    }
docs: Notifies the cancellation of the task.
  
  @param jobId the job id
  @param taskId the task id