public static HostRoleStatus calculateSummaryDisplayStatus(
      Map<HostRoleStatus, Integer> counters, int total, boolean skippable) {
    return counters.get(HostRoleStatus.FAILED) > 0 ? HostRoleStatus.FAILED:
           counters.get(HostRoleStatus.TIMEDOUT) > 0 ? HostRoleStatus.TIMEDOUT:
           counters.get(HostRoleStatus.SKIPPED_FAILED) > 0 ? HostRoleStatus.SKIPPED_FAILED :
           calculateSummaryStatus(counters, total, skippable);
  }
Calculate an overall display status based on the given status counts.

@param counters   counts of resources that are in various states
@param total      total number of resources in request
@param skippable  true if a single failed status should NOT result in an overall failed status return

@return summary request status based on statuses of tasks in different states.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java