@Override
  public List<String> getHostsForServiceComponent(String serviceName, String componentName){
    List<ServiceComponentHost> serviceComponentHosts = cluster.getServiceComponentHosts(serviceName, componentName);
    List<String> hosts = new ArrayList<>();
    for (ServiceComponentHost serviceComponentHost : serviceComponentHosts) {
      hosts.add(serviceComponentHost.getHostName());
    }
    return hosts;
  }
Create a view associated cluster from an Ambari cluster.

@param cluster  the Ambari cluster
ambari-server/src/main/java/org/apache/ambari/server/view/ClusterImpl.java