Package org.springframework.yarn.am.cluster

Examples of org.springframework.yarn.am.cluster.ContainerCluster


   * @param clusterId the container cluster identifier
   * @return the container cluster status response
   */
  @RequestMapping(value = "/{clusterId}", method = RequestMethod.GET)
  public HttpEntity<ContainerClusterResource> clusterInfo(@PathVariable("clusterId") String clusterId) {
    ContainerCluster cluster = delegate.getClusters().get(clusterId);
    if (cluster == null) {
      throw new NoSuchClusterException("No such cluster: " + clusterId);
    }
    ContainerClusterResource response = new ContainerClusterResource(cluster);
    return new ResponseEntity<ContainerClusterResource>(response, HttpStatus.OK);
View Full Code Here


    return new ResponseEntity<Void>(HttpStatus.OK);
  }

  @RequestMapping(value = "/{clusterId}", method = RequestMethod.DELETE)
  public ResponseEntity<Void> destroyCluster(@PathVariable("clusterId") String clusterId) {
    ContainerCluster cluster = getClusterMayThrow(clusterId);
    delegate.destroyCluster(cluster.getId());
    return new ResponseEntity<Void>(HttpStatus.OK);
  }
View Full Code Here

   * @param clusterId the container cluster identifier
   * @return the container cluster modify response
   */
  @RequestMapping(value = "/{clusterId}", method = RequestMethod.PATCH)
  public HttpEntity<Void> updateCluster(@PathVariable("clusterId") String clusterId, @RequestBody ContainerClusterCreateRequest request) {
    ContainerCluster cluster = delegate.getClusters().get(clusterId);
    if (cluster == null) {
      throw new NoSuchClusterException("No such cluster: " + clusterId);
    }
    ProjectionData data = new ProjectionData();
    if (request.getProjectionData().getAny() != null) {
View Full Code Here

   *
   * @param clusterId the cluster id
   * @return container cluster if found
   */
  private ContainerCluster getClusterMayThrow(String clusterId) {
    ContainerCluster cluster = delegate.getClusters().get(clusterId);
    if (cluster == null) {
      throw new NoSuchClusterException("No such cluster: " + clusterId);
    }
    return cluster;
  }
View Full Code Here

TOP

Related Classes of org.springframework.yarn.am.cluster.ContainerCluster

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.