@Component @Primary public class JobMonitoringCoordinator extends JobStateServiceImpl
genieEventBus, registry, scheduler
Constructor and Description |
---|
JobMonitoringCoordinator(GenieHostInfo genieHostInfo,
JobSearchService jobSearchService,
GenieEventBus genieEventBus,
org.springframework.scheduling.TaskScheduler scheduler,
io.micrometer.core.instrument.MeterRegistry registry,
org.springframework.core.io.Resource jobsDir,
JobsProperties jobsProperties,
JobSubmitterService jobSubmitterService,
ProcessChecker.Factory processCheckerFactory)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
onJobFinished(JobFinishedEvent event)
When a job is finished this event is fired.
|
void |
onJobStarted(JobStartedEvent event)
This event is fired when a job is started on this Genie node.
|
void |
onStartup(org.springframework.context.event.ContextRefreshedEvent event)
When this application is fully up and running this method should be triggered by an event.
|
done, getNumActiveJobs, getUsedMemory, init, jobExists, schedule, setMemoryAndTask
@Autowired public JobMonitoringCoordinator(GenieHostInfo genieHostInfo, JobSearchService jobSearchService, GenieEventBus genieEventBus, @Qualifier(value="genieTaskScheduler") org.springframework.scheduling.TaskScheduler scheduler, io.micrometer.core.instrument.MeterRegistry registry, org.springframework.core.io.Resource jobsDir, JobsProperties jobsProperties, JobSubmitterService jobSubmitterService, ProcessChecker.Factory processCheckerFactory) throws java.io.IOException
genieHostInfo
- Information about the host the Genie process is currently running onjobSearchService
- The search service to use to find jobsgenieEventBus
- The Genie event bus to use for publishing eventsscheduler
- The task scheduler to use to register scheduling of job checkersregistry
- The metrics registryjobsDir
- The directory where job output is storedjobsProperties
- The properties pertaining to jobsjobSubmitterService
- implementation of the job submitter serviceprocessCheckerFactory
- The factory of process checkersjava.io.IOException
- on error with the filesystem@EventListener public void onStartup(org.springframework.context.event.ContextRefreshedEvent event) throws GenieException
event
- The spring ready event indicating the application is ready to start taking loadGenieException
- on unrecoverable error@EventListener public void onJobStarted(JobStartedEvent event)
event
- The event of the started job@EventListener public void onJobFinished(JobFinishedEvent event) throws GenieException
event
- the event of the finished jobGenieException
- When a job execution can't be found (should never happen)