private HostRoleStatus calculateStatus(Long requestId, int numberOfTasks) {
    RequestDetails details = auditlogRequestCache.getIfPresent(requestId);
    if(details == null) {
      return HostRoleStatus.QUEUED;
    }
    Collection<HostRoleStatus> taskStatuses = details.getTaskStatuses();
    return CalculatedStatus.calculateSummaryStatus(CalculatedStatus.calculateStatusCounts(taskStatuses), numberOfTasks, false);
  }
Calculates summary status for the given request
@param requestId
@return
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java