public void removeHostRequests(String hostName) {
    ensureInitialized();

    for (Iterator<LogicalRequest> iter = allRequests.values().iterator(); iter.hasNext(); ) {
      LogicalRequest logicalRequest = iter.next();
      Collection<HostRequest> removed = logicalRequest.removeHostRequestByHostName(hostName);
      if (!logicalRequest.hasPendingHostRequests()) {
        outstandingRequests.remove(logicalRequest);
      }
      if (logicalRequest.getHostRequests().isEmpty()) {
        iter.remove();
      }
      if (!removed.isEmpty()) {
        persistedState.removeHostRequests(logicalRequest.getRequestId(), removed);
      }
    }
  }
Removes topology host requests matched to the given host.  If the parent
request has no more child host requests, then it is also removed.
This is used when hosts are deleted from the cluster.

@param hostName the host name for which requests should be removed
ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java