while (true) {
try {
jobStatuses = client.getJobStatuses(expId);
Set<String> strings = jobStatuses.keySet();
for (String key : strings) {
JobStatus jobStatus = jobStatuses.get(key);
if(jobStatus == null){
return;
}else {
if (JobState.COMPLETE.equals(jobStatus.getJobState())) {
log.info("Job completed Job ID: " + key);
return;
}else{
log.info("Job ID:" + key + " Job Status : " + jobStatuses.get(key).getJobState().toString());
}