Package org.apache.whirr.service

Examples of org.apache.whirr.service.ClusterSpec


    }
    try {
      if (!optionSet.hasArgument(instanceOption)) {
        throw new IllegalArgumentException("You need to specify an instance ID.");
      }
      ClusterSpec clusterSpec = getClusterSpec(optionSet);
      Service service = createService(clusterSpec.getServiceName());

      String instanceId = optionSet.valueOf(instanceOption);
      service.destroyInstance(clusterSpec, instanceId);
      updateInstancesFile(clusterSpec, instanceId);
View Full Code Here


  @Override
  protected void doAction(Map<InstanceTemplate, ClusterActionEvent> eventMap)
      throws IOException {
   
    for (Entry<InstanceTemplate, ClusterActionEvent> entry : eventMap.entrySet()) {
      ClusterSpec clusterSpec = entry.getValue().getClusterSpec();
      Cluster cluster = entry.getValue().getCluster();
      StatementBuilder statementBuilder = entry.getValue().getStatementBuilder();
      ComputeServiceContext computeServiceContext =
        ComputeServiceContextBuilder.build(getComputeServiceContextFactory(), clusterSpec);
      ComputeService computeService = computeServiceContext.getComputeService();
      Credentials credentials = new Credentials(
          clusterSpec.getClusterUser(),
          clusterSpec.getPrivateKey());
      try {
        LOG.info("Running configuration script");
        if (LOG.isDebugEnabled())
          LOG.debug("Running script:\n{}", statementBuilder.render(OsFamily.UNIX));
        computeService.runScriptOnNodesMatching(
View Full Code Here

TOP

Related Classes of org.apache.whirr.service.ClusterSpec

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.