Esempio n. 1
0
  @Override
  public Response getClusters() {
    List<HiveConfig> configs = hiveManager.getClusters();
    ArrayList<String> clusterNames = Lists.newArrayList();

    for (HiveConfig config : configs) {
      clusterNames.add(config.getClusterName());
    }

    String clusters = JsonUtil.GSON.toJson(clusterNames);
    return Response.status(Response.Status.OK).entity(clusters).build();
  }