synchronized void jobAdded ( JobInProgress job ) throws IOException { QueueSchedulingInfo qsi = queueInfoMap . get ( job . getProfile ( ) . getQueueName ( ) ) ; // qsi shouldn't be null // update user-specific info Integer i = qsi . numJobsByUser . get ( job . getProfile ( ) . getUser ( ) ) ; if ( null == i ) { i = 1 ; // set the count for running tasks to 0 qsi . mapTSI . numSlotsOccupiedByUser . put ( job . getProfile ( ) . getUser ( ) , Integer . valueOf ( 0 ) ) ; qsi . reduceTSI . numSlotsOccupiedByUser . put ( job . getProfile ( ) . getUser ( ) , Integer . valueOf ( 0 ) ) ; } else { i ++ ; } qsi . numJobsByUser . put ( job . getProfile ( ) . getUser ( ) , i ) ; // setup scheduler specific job information preInitializeJob ( job ) ; LOG . debug ( "Job " + job . getJobID ( ) . toString ( ) + " is added under user " + job . getProfile ( ) . getUser ( ) + ", user now has " + i + " jobs" ) ; }
called when a job is added