public Map<String, Map<String, String>> getEffectiveDesiredTags(Cluster cluster, String hostName,
                                                                  @Nullable Map<String, DesiredConfig> desiredConfigs) throws AmbariException {
    Host host = null;
    if (hostName != null) {
      try {
        host = clusters.getHost(hostName);
      } catch (HostNotFoundException e) {
        LOG.error("Cannot get desired config for unknown host {}", hostName, e);
      }
    }
    Map<String, HostConfig> desiredHostConfigs = (host == null) ? null
        : host.getDesiredHostConfigs(cluster, desiredConfigs);

    return getEffectiveDesiredTags(cluster, desiredConfigs, desiredHostConfigs);
  }
Gets the desired tags for a cluster and host

@param cluster
         the cluster
@param hostName
         the host name
@return a map of tag type to tag names with overrides
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java