public LinkedHashSet<String> getMasters() {
    return highAvailabilityHosts.stream().map(each -> each.getMaster()).collect(toCollection(LinkedHashSet::new));
  }
Create an instance with all healthy hosts.
ambari-server/src/main/java/org/apache/ambari/server/stack/HostsType.java