protected void killOverflowingTasks ( ) throws IOException { long localMinSpaceKill ; synchronized ( this ) { localMinSpaceKill = minSpaceKill ; } if ( ! enoughFreeSpace ( localMinSpaceKill ) ) { acceptNewTasks = false ; //we give up! do not accept new tasks until //all the ones running have finished and they're all cleared up synchronized ( this ) { TaskInProgress killMe = findTaskToKill ( null ) ; if ( killMe != null ) { String msg = "Tasktracker running out of space." + " Killing task." ; LOG . info ( killMe . getTask ( ) . getTaskID ( ) + ": " + msg ) ; killMe . reportDiagnosticInfo ( msg ) ; purgeTask ( killMe , false ) ; } } } }
Check if we re dangerously low on disk space If so kill jobs to free up space and make sure we don t accept any new tasks Try killing the reduce jobs first since I believe they use up most space Then pick the one with least progress