private boolean isConsideredDown(Cluster cluster, ServiceComponent serviceComponent,
      HostComponentSummary summary) throws AmbariException {
    Host host = clustersProvider.get().getHostById(summary.getHostId());
    MaintenanceState maintenanceState = host.getMaintenanceState(cluster.getClusterId());

    // non-MASTER components in maintenance mode should not count
    if (maintenanceState == MaintenanceState.ON && !serviceComponent.isMasterComponent()) {
      return false;
    }

    State desiredState = summary.getDesiredState();
    State currentState = summary.getCurrentState();

    switch (desiredState) {
      case INSTALLED:
      case STARTED:
        return currentState != State.STARTED;
      default:
        return false;
    }
  }
Gets whether this component should be considered as being "down" for the
purposes of this check. Component type, maintenance mode, and state are
taken into account.

@param cluster
         the cluster
@param serviceComponent
         the component
@param summary
         a summary of the state of the component on a host
@return {@code true} if the host component should be considered as failing
        this test.
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesUpCheck.java