class RemoteAmbariCluster implements Cluster {

  @Override
  public List<String> getHostsForServiceComponent(String serviceName, String componentName) {
    String url = String.format("%s/services/%s/components/%s?" +
      "fields=host_components/HostRoles/host_name", this.clusterPath, serviceName, componentName);

    List<String> hosts = new ArrayList<>();

    try {
      JsonElement response = configurationCache.get(url);

      if (response == null || !response.isJsonObject()) return hosts;

      JsonElement hostComponents = response.getAsJsonObject().get("host_components");

      if (hostComponents == null || !hostComponents.isJsonArray()) return hosts;

      for (JsonElement element : hostComponents.getAsJsonArray()) {
        JsonElement hostRoles = element.getAsJsonObject().get("HostRoles");
        String hostName = hostRoles.getAsJsonObject().get("host_name").getAsString();
        hosts.add(hostName);
      }

    } catch (ExecutionException e) {
      throw new RemoteAmbariConfigurationReadException("Can't retrieve host information from Remote Ambari", e);
    }

    return hosts;
  }

  public  RemoteAmbariCluster(RemoteAmbariClusterEntity remoteAmbariClusterEntity, Configuration config);
  public  RemoteAmbariCluster(String name, String clusterPath, AmbariStreamProvider streamProvider);

}