public void addJob ( JobID jobId ) throws Exception { Preconditions . checkNotNull ( jobLeaderIdActions ) ; LOG . debug ( "Add job {} to job leader id monitoring." , jobId ) ; if ( ! jobLeaderIdListeners . containsKey ( jobId ) ) { LeaderRetrievalService leaderRetrievalService = highAvailabilityServices . getJobManagerLeaderRetriever ( jobId ) ; JobLeaderIdListener jobIdListener = new JobLeaderIdListener ( jobId , jobLeaderIdActions , leaderRetrievalService ) ; jobLeaderIdListeners . put ( jobId , jobIdListener ) ; } }
Add a job to be monitored to retrieve the job leader id .