Minor: what I meant in the previous comment was adding a statement like: 
List<TaskDetails> tasks = jobDetails.getTasks();
if(tasks != null) { 
  LOG.info("For endpoint /tasks/" + cluster + "/" + jobId + ", fetched " + tasks.size() + " tasks, spent time " + timer " );
} else {
LOG.info("For endpoint /tasks/" + cluster + "/" + jobId + ", found no tasks, spent time " + timer " );
}
No worries, I can add this later.