@Override
  public Host getHost(final String hostName) {
    if (StringUtils.isEmpty(hostName)) {
      return null;
    }

    Collection<Host> hosts = getHosts();
    if(hosts != null) {
      for (Host host : hosts) {
        String hostString = host.getHostName();
        if(hostName.equalsIgnoreCase(hostString)) {
          return host;
        }
      }
    }
    return null;
  }
@param serviceName name of the service
@param componentName name of the component
@return the set of hosts for the provided service and component
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java