Class ArchiveStatusCleanupTask
java.lang.Object
com.netflix.genie.web.tasks.GenieTask
com.netflix.genie.web.tasks.leader.LeaderTask
com.netflix.genie.web.tasks.leader.ArchiveStatusCleanupTask
- All Implemented Interfaces:
Runnable
Leader task that find jobs whose archival status was left in 'PENDING' state.
This can for example happen if the agent fails to update the server after successfully archiving.
The logic is summarized as:
If a job finished running more than N minutes ago, and the agent is disconnected and the archive status is PENDING,
then set the archive status to UNKNOWN.
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionArchiveStatusCleanupTask(DataServices dataServices, AgentRoutingService agentRoutingService, ArchiveStatusCleanupProperties properties, io.micrometer.core.instrument.MeterRegistry registry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionlongGet how long the system should wait between invoking the run() method of this task in milliseconds.Get the type of scheduling mechanism which should be used to schedule this task.voidrun()Methods inherited from class com.netflix.genie.web.tasks.leader.LeaderTask
cleanupMethods inherited from class com.netflix.genie.web.tasks.GenieTask
getFixedDelay, getTrigger
-
Constructor Details
-
ArchiveStatusCleanupTask
public ArchiveStatusCleanupTask(DataServices dataServices, AgentRoutingService agentRoutingService, ArchiveStatusCleanupProperties properties, io.micrometer.core.instrument.MeterRegistry registry) Constructor.- Parameters:
dataServices- data servicesagentRoutingService- agent routing serviceproperties- task propertiesregistry- metrics registry
-
-
Method Details
-
run
public void run() -
getScheduleType
Get the type of scheduling mechanism which should be used to schedule this task.- Specified by:
getScheduleTypein classGenieTask- Returns:
- The schedule type
-
getFixedRate
public long getFixedRate()Get how long the system should wait between invoking the run() method of this task in milliseconds.- Overrides:
getFixedRatein classGenieTask- Returns:
- The period to wait between invocations of run for this task
-