- All Implemented Interfaces:
- Runnable
public class JobScheduler
extends Object
implements Runnable
Schedules a cluster job. Polls a queue containing job ids to coordinate. Each time it gets a job id from the queue,
it will examine the status of tasks for the job's current stage and take the appropriate action. If all tasks in the
stage successfully completed, the job will be moved to the next stage and all tasks in the stage will be scheduled.
If some task was failed, the appropriate retry and rollback actions are taken for the task. If the job itself fails,
unneeded tasks are dropped and cluster and job state is managed. If all tasks for the job have completed, status
is updated across the job and cluster.