private void fifoWeightAdjust ( Pool pool ) { List < JobInProgress > jobs = new ArrayList < JobInProgress > ( ) ; jobs . addAll ( pool . getJobs ( ) ) ; Collections . sort ( jobs , fifoComparator ) ; double factor = 1.0 ; for ( JobInProgress job : jobs ) { JobInfo info = infos . get ( job ) ; if ( info == null ) { throw new IllegalStateException ( "Couldn't find job " + job . jobId + " in pool " + pool . getName ( ) ) ; } info . mapWeight *= factor ; info . reduceWeight *= factor ; factor *= FIFO_WEIGHT_DECAY_FACTOR ; } }
Boost the weight for the older jobs .