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

Examples of org.springframework.yarn.boot.actuate.endpoint.mvc.ContainerClusterModifyRequest


    return "Cluster " + clusterId + " destroyed.";
  }

  private String doClusterStart(YarnClient client, ApplicationId applicationId, String clusterId) {
    YarnContainerClusterOperations operations = buildClusterOperations(client, applicationId);
    ContainerClusterModifyRequest request = new ContainerClusterModifyRequest();
    request.setAction("start");
    operations.clusterStart(clusterId, request);
    return "Cluster " + clusterId + " started.";
  }
View Full Code Here


    return "Cluster " + clusterId + " started.";
  }

  private String doClusterStop(YarnClient client, ApplicationId applicationId, String clusterId) {
    YarnContainerClusterOperations operations = buildClusterOperations(client, applicationId);
    ContainerClusterModifyRequest request = new ContainerClusterModifyRequest();
    request.setAction("stop");
    operations.clusterStop(clusterId, request);
    return "Cluster " + clusterId + " stopped.";
  }
View Full Code Here

      andExpect(method(HttpMethod.PUT)).
      andExpect(jsonPath("$.*", hasSize(2))).
      andExpect(jsonPath("$.projectionData", nullValue())).
      andExpect(jsonPath("$.action", is(ModifyAction.START.toString().toLowerCase()))).
      andRespond(withSuccess(responseBody, MediaType.APPLICATION_JSON));
    ContainerClusterModifyRequest request = new ContainerClusterModifyRequest();
    request.setAction("start");
    ContainerClusterResource response = operations.clusterStart("cluster1", request);
    assertThat(response, notNullValue());
  }
View Full Code Here

      andExpect(method(HttpMethod.PUT)).
      andExpect(jsonPath("$.*", hasSize(2))).
      andExpect(jsonPath("$.projectionData", nullValue())).
      andExpect(jsonPath("$.action", is(ModifyAction.STOP.toString().toLowerCase()))).
      andRespond(withSuccess(responseBody, MediaType.APPLICATION_JSON));
    ContainerClusterModifyRequest request = new ContainerClusterModifyRequest();
    request.setAction("stop");
    ContainerClusterResource response = operations.clusterStop("cluster1", request);
    assertThat(response, notNullValue());
  }
View Full Code Here

TOP

Related Classes of org.springframework.yarn.boot.actuate.endpoint.mvc.ContainerClusterModifyRequest

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.