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 ) ; }
Notifies the cancellation of the task .