private void publishAddingHostsToCluster(Set<String> hostnames, String clusterName) throws AmbariException {
    HostsAddedEvent event = new HostsAddedEvent(getCluster(clusterName).getClusterId(), hostnames);
    eventPublisher.publish(event);
  }
For each host, attempts to map it to the cluster, and apply the cluster's current version to the host.
@param hostnames Collection of host names
@param clusterName Cluster name
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java