public static HostRoleStatus getOverallStatusForRequest (Collection<HostRoleStatus> hostRoleStatuses) {
    Map<HostRoleStatus, Integer> statusCount = calculateStatusCounts(hostRoleStatuses);
    return calculateSummaryStatus(statusCount, hostRoleStatuses.size(), false);
  }
Calculate overall status from collection of statuses
@param hostRoleStatuses list of all stage's {@link HostRoleStatus}
@return overall status of a request
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java