public String getHostState(String hostName) {
    for (Map.Entry<String, Map<String, Set<String>>> entry : hostComponents.entrySet()) {
      Map<String, Set<String>> serviceHostComponents = entry.getValue();
      for (Map.Entry<String, Set<String>> hostEntry : serviceHostComponents.entrySet()) {
        if (hostEntry.getKey().equals(hostName)) {
          Set<String> componentNames = hostEntry.getValue();
          for (String componentName : componentNames) {
            if (isClientOnlyComponent(componentName)) continue;
            if (stateProvider.getRunningState(hostName, componentName) != StateProvider.State.Running) {
              return "UNHEALTHY";
            }
          }
        }
      }
    }
    return "HEALTHY";
  }
Get the host state from the given host name.

@param hostName  the host name

@return the host state
contrib/ambari-scom/ambari-scom-server/src/main/java/org/apache/ambari/msi/ClusterDefinition.java