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(org.apache.flink.api.common.JobID jobID)
Clear job state form the registry, usually called after job finish.
|
RunningJobsRegistry.JobSchedulingStatus |
getJobSchedulingStatus(org.apache.flink.api.common.JobID jobID)
Gets the scheduling status of a job.
|
void |
setJobFinished(org.apache.flink.api.common.JobID jobID)
Marks a job as completed.
|
void |
setJobRunning(org.apache.flink.api.common.JobID jobID)
Marks a job as running.
|
void setJobRunning(org.apache.flink.api.common.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(org.apache.flink.api.common.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(org.apache.flink.api.common.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(org.apache.flink.api.common.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–2020 The Apache Software Foundation. All rights reserved.