@Override
  public String getJobTrackerHost(Cluster cluster) {
    try {
      Service svc = cluster.getService("MAPREDUCE");
      ServiceComponent sc = svc.getServiceComponent(Role.JOBTRACKER.toString());
      if (sc.getServiceComponentHosts() != null
          && !sc.getServiceComponentHosts().isEmpty()) {
        return sc.getServiceComponentHosts().keySet().iterator().next();
      }
    } catch (AmbariException ex) {
      return null;
    }
    return null;
  }
Save cluster update results to retrieve later
@param clusterRequest   cluster request info
@param clusterResponse  cluster response info
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java