public Map<String, Collection<String>> getProjectedTopology() {
    Map<String, Collection<String>> hostComponentMap = new HashMap<>();

    //todo: synchronization
    for (HostRequest hostRequest : allHostRequests) {
      HostGroup hostGroup = hostRequest.getHostGroup();
      for (String host : topology.getHostGroupInfo().get(hostGroup.getName()).getHostNames()) {
        Collection<String> hostComponents = hostComponentMap.get(host);
        if (hostComponents == null) {
          hostComponents = new HashSet<>();
          hostComponentMap.put(host, hostComponents);
        }
        hostComponents.addAll(hostGroup.getComponentNames());
      }
    }
    return hostComponentMap;
  }
Removes pending host requests (outstanding requests not picked up by any host, where hostName is null) for a host group.
@param hostGroupName
@return
ambari-server/src/main/java/org/apache/ambari/server/topology/LogicalRequest.java