public synchronized void notifyTaskFailure ( long jobId , int taskId , String errorMessage ) { Pair < Long , Integer > id = new Pair <> ( jobId , taskId ) ; TaskInfo . Builder taskInfo = mUnfinishedTasks . get ( id ) ; taskInfo . setStatus ( Status . FAILED ) ; taskInfo . setErrorMessage ( errorMessage ) ; finishTask ( id ) ; LOG . info ( "Task {} for job {} failed: {}" , taskId , jobId , errorMessage ) ; }
Notifies the failure of the task .