public String getBatchRequestStatus(Long executionId, String clusterName) throws AmbariException {
    Cluster cluster = clusters.getCluster(clusterName);
    RequestExecution requestExecution = cluster.getAllRequestExecutions().get(executionId);

    if (requestExecution == null) {
      throw new AmbariException("Unable to find request schedule with id = "
          + executionId);
    }

    return requestExecution.getStatus();
  }
Get status of a long running operation
@return
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/scheduler/ExecutionScheduleManager.java