public Collection<String> getHostNames() {
    // needs to be an exclusive lock, not a read lock because collection
    // shouldn't change while copying elements into the new set instance
    synchronized (hostNames) {
      return new HashSet<>(hostNames);
    }
  }
Get the collection of user specified host names for the host group.
If the user specified a count instead of host names then an empty
collection is returned.

@return collection of user specified host names; will never be null
ambari-server/src/main/java/org/apache/ambari/server/topology/HostGroupInfo.java