public JobStatus getJobStatus(JobInstance jobInstance) {
    Job job = queryJobStatusServers(baseUrl -> String.format(ResourceConstants.GET_JOBS_URL, baseUrl,
        jobInstance.getJobName(), jobInstance.getJobId()), new TypeReference<Job>() { });
    return job.getStatus();
  }
This method should be used to find the JobStatus of a jobInstance.
@param jobInstance a instance of the job.
@return the job status of the {@link JobInstance}.
@throws SamzaException if there are any problems with the http request.
samza-rest/src/main/java/org/apache/samza/monitor/JobsClient.java