public class ZooKeeperRunningJobsRegistry extends Object implements RunningJobsRegistry
RunningJobsRegistry.JobSchedulingStatus
Constructor and Description |
---|
ZooKeeperRunningJobsRegistry(org.apache.curator.framework.CuratorFramework client,
Configuration configuration) |
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.
|
public ZooKeeperRunningJobsRegistry(org.apache.curator.framework.CuratorFramework client, Configuration configuration)
public void setJobRunning(JobID jobID) throws IOException
RunningJobsRegistry
RunningJobsRegistry.getJobSchedulingStatus(JobID)
method will return RunningJobsRegistry.JobSchedulingStatus.RUNNING
.setJobRunning
in interface RunningJobsRegistry
jobID
- The id of the job.IOException
- Thrown when the communication with the highly-available storage or registry
failed and could not be retried.public void setJobFinished(JobID jobID) throws IOException
RunningJobsRegistry
RunningJobsRegistry.getJobSchedulingStatus(JobID)
method will return RunningJobsRegistry.JobSchedulingStatus.DONE
.setJobFinished
in interface RunningJobsRegistry
jobID
- The id of the job.IOException
- Thrown when the communication with the highly-available storage or registry
failed and could not be retried.public RunningJobsRegistry.JobSchedulingStatus getJobSchedulingStatus(JobID jobID) throws IOException
RunningJobsRegistry
getJobSchedulingStatus
in interface RunningJobsRegistry
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.public void clearJob(JobID jobID) throws IOException
RunningJobsRegistry
clearJob
in interface RunningJobsRegistry
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.