@Component public class ClusterCheckerTask extends LeadershipTask
| Constructor and Description |
|---|
ClusterCheckerTask(java.lang.String hostName,
ClusterCheckerProperties properties,
com.netflix.genie.core.services.JobSearchService jobSearchService,
com.netflix.genie.core.services.JobPersistenceService jobPersistenceService,
org.springframework.web.client.RestTemplate restTemplate,
org.springframework.boot.actuate.autoconfigure.ManagementServerProperties managementServerProperties,
com.netflix.spectator.api.Registry registry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Any cleanup that needs to be performed when this task is stopped due to leadership being revoked.
|
long |
getFixedRate()
Get how long the system should wait between invoking the run() method of this task in milliseconds.
|
GenieTaskScheduleType |
getScheduleType()
Get the type of scheduling mechanism which should be used to schedule this task.
|
void |
run()
Ping the health check endpoint of all other nodes which have running jobs.
|
getFixedDelay, getTrigger@Autowired
public ClusterCheckerTask(@NotNull
java.lang.String hostName,
@NotNull
ClusterCheckerProperties properties,
@NotNull
com.netflix.genie.core.services.JobSearchService jobSearchService,
@NotNull
com.netflix.genie.core.services.JobPersistenceService jobPersistenceService,
@Qualifier(value="genieRestTemplate") @NotNull
org.springframework.web.client.RestTemplate restTemplate,
@NotNull
org.springframework.boot.actuate.autoconfigure.ManagementServerProperties managementServerProperties,
@NotNull
com.netflix.spectator.api.Registry registry)
hostName - The host name of this nodeproperties - The properties to use to configure the taskjobSearchService - The job search service to usejobPersistenceService - The job persistence service to userestTemplate - The rest template for http callsmanagementServerProperties - The properties where Spring actuator is runningregistry - The spectator registry for getting metricspublic void run()
public GenieTaskScheduleType getScheduleType()
getScheduleType in class GenieTaskpublic long getFixedRate()
getFixedRate in class GenieTaskpublic void cleanup()
cleanup in class LeadershipTask