@Component
@Primary
public class JobMonitoringCoordinator
extends com.netflix.genie.core.services.impl.JobStateServiceImpl
| Constructor and Description |
|---|
JobMonitoringCoordinator(java.lang.String hostName,
com.netflix.genie.core.services.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,
com.netflix.genie.core.properties.JobsProperties jobsProperties,
com.netflix.genie.core.services.JobSubmitterService jobSubmitterService)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onJobFinished(com.netflix.genie.core.events.JobFinishedEvent event)
When a job is finished this event is fired.
|
void |
onJobStarted(com.netflix.genie.core.events.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.
|
@Autowired
public JobMonitoringCoordinator(java.lang.String hostName,
com.netflix.genie.core.services.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,
com.netflix.genie.core.properties.JobsProperties jobsProperties,
com.netflix.genie.core.services.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 com.netflix.genie.common.exceptions.GenieException
event - The spring ready event indicating the application is ready to start taking loadcom.netflix.genie.common.exceptions.GenieException - on unrecoverable error@EventListener public void onJobStarted(com.netflix.genie.core.events.JobStartedEvent event)
event - The event of the started job@EventListener
public void onJobFinished(com.netflix.genie.core.events.JobFinishedEvent event)
throws com.netflix.genie.common.exceptions.GenieException
event - the event of the finished jobcom.netflix.genie.common.exceptions.GenieException - When a job execution can't be found (should never happen)