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:
java.lang.Runnable
public class ArchiveStatusCleanupTask extends LeaderTask
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
Constructors Constructor Description ArchiveStatusCleanupTask(DataServices dataServices, AgentRoutingService agentRoutingService, ArchiveStatusCleanupProperties properties, io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
Methods inherited from class com.netflix.genie.web.tasks.leader.LeaderTask
cleanup
-
Methods inherited from class com.netflix.genie.web.tasks.GenieTask
getFixedDelay, getTrigger
-
-
-
-
Constructor Detail
-
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 Detail
-
run
public void run()
-
getScheduleType
public GenieTaskScheduleType getScheduleType()
Get the type of scheduling mechanism which should be used to schedule this task.- Specified by:
getScheduleType
in 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:
getFixedRate
in classGenieTask
- Returns:
- The period to wait between invocations of run for this task
-
-