Examples of launchCluster()


Examples of org.apache.whirr.ClusterController.launchCluster()

            throws IOException, GFacHandlerException, ConfigurationException, InterruptedException, TransformerException, ParserConfigurationException {
        ClusterSpec hadoopClusterSpec =
                whirrConfigurationToClusterSpec(hostDescription, workingDirectory);
        ClusterController hadoopClusterController =
                createClusterController(hadoopClusterSpec.getServiceName());
        Cluster hadoopCluster =  hadoopClusterController.launchCluster(hadoopClusterSpec);

        logger.info(String.format("Started cluster of %s instances.\n",
                hadoopCluster.getInstances().size()));

        File siteXML = new File(workingDirectory, "hadoop-site.xml");
View Full Code Here

Examples of org.apache.whirr.ClusterController.launchCluster()

        newInstanceTemplate("noop", "noop1", "noop2"),
        newInstanceTemplate("noop1", "noop3")
    ));

    ClusterController controller = new ClusterController();
    cluster = controller.launchCluster(clusterSpec);
  }

  private InstanceTemplate newInstanceTemplate(String... roles) {
    return InstanceTemplate.builder().numberOfInstance(1).roles(roles).build();
  }
View Full Code Here

Examples of org.apache.whirr.ClusterController.launchCluster()

    tempSpec.setProvider("stub");
    tempSpec.setIdentity("dummy");
    tempSpec.setStateStore("none");

    ClusterController controller = new ClusterController();
    Cluster tempCluster = controller.launchCluster(tempSpec);

   
    action.execute(tempSpec, tempCluster);
   
    List<StatementOnNode> executions = dryRun.getTotallyOrderedExecutions();
View Full Code Here

Examples of org.apache.whirr.ClusterController.launchCluster()

    }
  }

  public int run(InputStream in, PrintStream out, PrintStream err, ClusterSpec clusterSpec) throws Exception {
    ClusterController controller = createClusterController(clusterSpec.getServiceName());
    Cluster cluster = controller.launchCluster(clusterSpec);
    out.printf("Started cluster of %s instances\n",
      cluster.getInstances().size());
    out.println(cluster);

    Utils.printSSHConnectionDetails(out, clusterSpec, cluster, 20);
View Full Code Here

Examples of org.apache.whirr.ClusterController.launchCluster()

   
    ClusterControllerFactory factory = mock(ClusterControllerFactory.class);
    ClusterController controller = mock(ClusterController.class);
    Cluster cluster = mock(Cluster.class);
    when(factory.create((String) any())).thenReturn(controller);
    when(controller.launchCluster((ClusterSpec) any())).thenReturn(cluster);
   
    LaunchClusterCommand command = new LaunchClusterCommand(factory);
    Map<String, File> keys = KeyPair.generateTemporaryFiles();
   
    int rc = command.run(null, out, null, Lists.newArrayList(
View Full Code Here

Examples of org.apache.whirr.ClusterController.launchCluster()

   
    ClusterControllerFactory factory = mock(ClusterControllerFactory.class);
    ClusterController controller = mock(ClusterController.class);
    Cluster cluster = mock(Cluster.class);
    when(factory.create((String) any())).thenReturn(controller);
    when(controller.launchCluster((ClusterSpec) any())).thenReturn(cluster);
   
    LaunchClusterCommand command = new LaunchClusterCommand(factory);
    Map<String, File> keys = KeyPair.generateTemporaryFiles();
   
    int rc = command.run(null, out, null, Lists.newArrayList(
View Full Code Here

Examples of org.apache.whirr.ClusterController.launchCluster()

    ClusterController controller = new ClusterController();

    DryRun dryRun = getDryRunInControllerForCluster(controller, clusterSpec);
    dryRun.reset();
   
    controller.launchCluster(clusterSpec);
    controller.destroyCluster(clusterSpec);

    ListMultimap<NodeMetadata, Statement> perNodeExecutions = dryRun.getExecutions();

    for (Entry<NodeMetadata, Collection<Statement>> entry : perNodeExecutions
View Full Code Here

Examples of org.apache.whirr.ClusterController.launchCluster()

    ClusterController controller = new ClusterController();
   
    DryRun dryRun = getDryRunInControllerForCluster(controller, clusterSpec);
    dryRun.reset();
   
    controller.launchCluster(clusterSpec);
    controller.destroyCluster(clusterSpec);

   
    ListMultimap<NodeMetadata, Statement> perNodeExecutions = dryRun.getExecutions();
    List<StatementOnNode> totalExecutions = dryRun.getTotallyOrderedExecutions();
View Full Code Here

Examples of org.apache.whirr.ClusterController.launchCluster()

        newInstanceTemplate("noop", "noop1", "noop2"),
        newInstanceTemplate("noop1", "noop3")
    ));

    ClusterController controller = new ClusterController();
    cluster = controller.launchCluster(clusterSpec);
  }

  private InstanceTemplate newInstanceTemplate(String... roles) {
    return InstanceTemplate.builder().numberOfInstance(1).roles(roles).build();
  }
View Full Code Here

Examples of org.apache.whirr.ClusterController.launchCluster()

  protected DryRun launchWithClusterSpec(ClusterSpec clusterSpec) throws IOException, InterruptedException {
    ClusterController controller = new ClusterController();
    DryRun dryRun = controller.getCompute().apply(clusterSpec).utils().injector().getInstance(DryRun.class);
    dryRun.reset();
    controller.launchCluster(clusterSpec);
    return dryRun;
  }

  /**
   * Tests that a simple cluster is correctly loaded and executed.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.