private TaskAttemptInfo getReduceTaskAttemptInfo ( TaskTracker taskTracker , TaskAttemptID taskAttemptID ) { assert ( ! taskAttemptID . isMap ( ) ) ; TaskID taskId = taskAttemptID . getTaskID ( ) ; TaskType taskType ; if ( taskAttemptID . isMap ( ) ) { taskType = TaskType . MAP ; } else { taskType = TaskType . REDUCE ; } TaskAttemptInfo taskAttemptInfo = jobStory . getTaskAttemptInfo ( taskType , taskId . getId ( ) , taskAttemptID . getId ( ) ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "get an attempt: " + taskAttemptID . toString ( ) + ", state=" + taskAttemptInfo . getRunState ( ) + ", runtime=" + ( ( taskAttemptID . isMap ( ) ) ? taskAttemptInfo . getRuntime ( ) : ( ( ReduceTaskAttemptInfo ) taskAttemptInfo ) . getReduceRuntime ( ) ) ) ; } return taskAttemptInfo ; }
Given the reduce taskAttemptID returns the TaskAttemptInfo . Deconstructs the reduce taskAttemptID and looks up the jobStory with the parts taskType id of task id of task attempt .