private List < TaskTrackerAction > getJobsForCleanup ( String taskTracker ) { Set < JobID > jobs = null ; synchronized ( trackerToJobsToCleanup ) { jobs = trackerToJobsToCleanup . remove ( taskTracker ) ; } if ( jobs != null ) { // prepare the actions list List < TaskTrackerAction > killList = new ArrayList < TaskTrackerAction > ( ) ; for ( JobID killJobId : jobs ) { killList . add ( new KillJobAction ( killJobId ) ) ; LOG . debug ( taskTracker + " -> KillJobAction: " + killJobId ) ; } return killList ; } return null ; }
A tracker wants to know if any job needs cleanup because the job completed .