void cleanUpInitializedJobsList ( ) { Iterator < Entry < JobID , JobInProgress > > jobsIterator = initializedJobs . entrySet ( ) . iterator ( ) ; while ( jobsIterator . hasNext ( ) ) { Entry < JobID , JobInProgress > entry = jobsIterator . next ( ) ; JobInProgress job = entry . getValue ( ) ; if ( job . getStatus ( ) . getRunState ( ) == JobStatus . RUNNING ) { if ( isScheduled ( job ) ) { LOG . info ( "Removing scheduled jobs from waiting queue" + job . getJobID ( ) ) ; jobsIterator . remove ( ) ; jobQueueManager . removeJobFromWaitingQueue ( job ) ; continue ; } } if ( job . isComplete ( ) ) { LOG . info ( "Removing killed/completed job from initalized jobs " + "list : " + job . getJobID ( ) ) ; jobsIterator . remove ( ) ; } } }
Method which is used internally to clean up the initialized jobs data structure which the job initialization poller uses to check if a job is initalized or not .