public class YarnRestJobStatusProvider extends java.lang.Object implements JobStatusProvider
JobStatusProvider
that retrieves
the job status from the YARN REST api.Constructor and Description |
---|
YarnRestJobStatusProvider(JobsResourceConfig config) |
Modifier and Type | Method and Description |
---|---|
Job |
getJobStatus(JobInstance jobInstance) |
void |
getJobStatuses(java.util.Collection<Job> jobs)
Populates the status* fields of each
Job in the provided Collection. |
public YarnRestJobStatusProvider(JobsResourceConfig config)
public void getJobStatuses(java.util.Collection<Job> jobs) throws java.io.IOException, java.lang.InterruptedException
JobStatusProvider
Job
in the provided Collection.getJobStatuses
in interface JobStatusProvider
jobs
- the collection of Job
for which the status is needed.java.io.IOException
- if there was a problem executing the command to get the status.java.lang.InterruptedException
- if the thread was interrupted while waiting for the status result.public Job getJobStatus(JobInstance jobInstance) throws java.io.IOException, java.lang.InterruptedException
getJobStatus
in interface JobStatusProvider
jobInstance
- the instance of the job.Job
containing
the status for the job specified by jobName and jobId.java.io.IOException
- if there was a problem executing the command to get the status.java.lang.InterruptedException
- if the thread was interrupted while waiting for the status result.