public class YarnCliJobStatusProvider extends java.lang.Object implements JobStatusProvider
JobStatusProvider that retrieves
the job status from the YARN command line interface.| Constructor and Description |
|---|
YarnCliJobStatusProvider(ScriptPathProvider provider)
Default constructor.
|
| 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. |
static java.lang.String |
getQualifiedJobName(JobInstance jobInstance)
Constructs the job name used in YARN.
|
public YarnCliJobStatusProvider(ScriptPathProvider provider)
provider - a delegate that provides the path to the Samza yarn scripts.public static java.lang.String getQualifiedJobName(JobInstance jobInstance)
jobInstance - the instance of the job.public void getJobStatuses(java.util.Collection<Job> jobs) throws java.io.IOException, java.lang.InterruptedException
JobStatusProviderJob in the provided Collection.getJobStatuses in interface JobStatusProviderjobs - 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 JobStatusProviderjobInstance - 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.