@Component @Primary public class JobMonitoringCoordinator extends JobStateServiceImpl
publisher, registry, scheduler| Constructor and Description |
|---|
JobMonitoringCoordinator(java.lang.String hostName,
JobSearchService jobSearchService,
org.springframework.context.ApplicationEventPublisher publisher,
org.springframework.context.event.ApplicationEventMulticaster eventMulticaster,
org.springframework.scheduling.TaskScheduler scheduler,
org.apache.commons.exec.Executor executor,
com.netflix.spectator.api.Registry registry,
org.springframework.core.io.Resource jobsDir,
JobsProperties jobsProperties,
JobSubmitterService jobSubmitterService)
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(java.lang.String hostName,
JobSearchService jobSearchService,
org.springframework.context.ApplicationEventPublisher publisher,
org.springframework.context.event.ApplicationEventMulticaster eventMulticaster,
org.springframework.scheduling.TaskScheduler scheduler,
org.apache.commons.exec.Executor executor,
com.netflix.spectator.api.Registry registry,
org.springframework.core.io.Resource jobsDir,
JobsProperties jobsProperties,
JobSubmitterService jobSubmitterService)
throws java.io.IOException
hostName - The name of the host this Genie process is running onjobSearchService - The search service to use to find jobspublisher - The application event publisher to use to publish synchronous eventseventMulticaster - The event eventMulticaster to use to publish asynchronous eventsscheduler - The task scheduler to use to register scheduling of job checkersexecutor - The executor to use to launch processesregistry - The metrics registryjobsDir - The directory where job output is storedjobsProperties - The properties pertaining to jobsjobSubmitterService - implementation of the job submitter servicejava.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)