TaskInProgress [ ] getTasks ( TaskType type ) { TaskInProgress [ ] tasks = null ; switch ( type ) { case MAP : { tasks = maps ; } break ; case REDUCE : { tasks = reduces ; } break ; case JOB_SETUP : { tasks = setup ; } break ; case JOB_CLEANUP : { tasks = cleanup ; } break ; default : { tasks = new TaskInProgress [ 0 ] ; } break ; } return tasks ; }
Get all the tasks of the desired type in this job .