public interface RunningJobsRegistry
This registry is used in highly-available setups with multiple master nodes, to determine whether a new leader should attempt to recover a certain job (because the job is still running), or whether the job has already finished successfully (in case of a finite job) and the leader has only been granted leadership because the previous leader quit cleanly after the job was finished.
In addition, the registry can help to determine whether a newly assigned leader JobManager should attempt reconciliation with running TaskManagers, or immediately schedule the job from the latest checkpoint/savepoint.
Modifier and Type | Interface and Description |
---|---|
static class |
RunningJobsRegistry.JobSchedulingStatus
The scheduling status of a job, as maintained by the
RunningJobsRegistry . |
Modifier and Type | Method and Description |
---|---|
void |
clearJob(JobID jobID)
Clear job state form the registry, usually called after job finish.
|
RunningJobsRegistry.JobSchedulingStatus |
getJobSchedulingStatus(JobID jobID)
Gets the scheduling status of a job.
|
void |
setJobFinished(JobID jobID)
Marks a job as completed.
|
void |
setJobRunning(JobID jobID)
Marks a job as running.
|
void setJobRunning(JobID jobID) throws IOException
getJobSchedulingStatus(JobID)
method will return RunningJobsRegistry.JobSchedulingStatus.RUNNING
.jobID
- The id of the job.IOException
- Thrown when the communication with the highly-available storage or
registry failed and could not be retried.void setJobFinished(JobID jobID) throws IOException
getJobSchedulingStatus(JobID)
method will return RunningJobsRegistry.JobSchedulingStatus.DONE
.jobID
- The id of the job.IOException
- Thrown when the communication with the highly-available storage or
registry failed and could not be retried.RunningJobsRegistry.JobSchedulingStatus getJobSchedulingStatus(JobID jobID) throws IOException
jobID
- The id of the job to check.IOException
- Thrown when the communication with the highly-available storage or
registry failed and could not be retried.void clearJob(JobID jobID) throws IOException
jobID
- The id of the job to check.IOException
- Thrown when the communication with the highly-available storage or
registry failed and could not be retried.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.