Package org.springframework.yarn.boot.actuate.endpoint.mvc.domain

Examples of org.springframework.yarn.boot.actuate.endpoint.mvc.domain.YarnContainerClusterEndpointResource


  }

  private String doClustersInfo(YarnClient client, ApplicationId applicationId) {
    YarnContainerClusterOperations operations = buildClusterOperations(client, applicationId);
    YarnContainerClusterEndpointResource response = operations.getClusters();
    return ContainerClusterReport.clustersInfoReportBuilder()
        .add(ClustersInfoField.ID)
        .from(new ArrayList<String>(response.getClusters()))
        .build().toString();
  }
View Full Code Here


   */
  @RequestMapping(method = RequestMethod.GET)
  @ResponseBody
  public Object invoke() {
    Collection<ContainerCluster> clusters = delegate.getClusters().values();
    YarnContainerClusterEndpointResource response = new YarnContainerClusterEndpointResource();
    Collection<String> clusterIds = new ArrayList<String>();
    for (ContainerCluster cluster : clusters) {
      clusterIds.add(cluster.getId());
    }
    response.setClusters(clusterIds);
    return response;
  }
View Full Code Here

    String responseBody = "{\"clusters\":[]}";
    mockServer.
      expect(requestTo("/" + YarnContainerClusterEndpoint.ENDPOINT_ID)).
      andExpect(method(HttpMethod.GET)).
      andRespond(withSuccess(responseBody, MediaType.APPLICATION_JSON));
    YarnContainerClusterEndpointResource response = operations.getClusters();
    assertThat(response, notNullValue());
  }
View Full Code Here

TOP

Related Classes of org.springframework.yarn.boot.actuate.endpoint.mvc.domain.YarnContainerClusterEndpointResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.