Examples of launchCluster()


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

    ClusterSpec spec = getTestClusterSpec();
    ClusterController controller =
      (new ClusterControllerFactory()).create(spec.getServiceName());

    try {
      controller.launchCluster(spec);
      Map<? extends NodeMetadata, ExecResponse> responseMap = controller.runScriptOnNodesMatching(
        spec,
        Predicates.<NodeMetadata>alwaysTrue(),
        exec("cat /tmp/bootstrap-start /tmp/bootstrap-end /tmp/configure-start")
      );
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()

    }
   
    try {
      ClusterSpec clusterSpec = getClusterSpec(optionSet);
      ClusterController controller = createClusterController(clusterSpec.getServiceName());
      Cluster cluster = controller.launchCluster(clusterSpec);
      out.printf("Started cluster of %s instances\n",
          cluster.getInstances().size());
      out.println(cluster);
      return 0;
    } catch (IllegalArgumentException e) {
View Full Code Here

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()

    }
   
    try {
      ClusterSpec clusterSpec = getClusterSpec(optionSet);
      ClusterController controller = createClusterController(clusterSpec.getServiceName());
      Cluster cluster = controller.launchCluster(clusterSpec);
      out.printf("Started cluster of %s instances\n",
          cluster.getInstances().size());
      out.println(cluster);
      return 0;
    } catch (IllegalArgumentException e) {
View Full Code Here

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

    }
   
    try {
      ClusterSpec clusterSpec = getClusterSpec(optionSet);
      ClusterController controller = createClusterController(clusterSpec.getServiceName());
      Cluster cluster = controller.launchCluster(clusterSpec);
      out.printf("Started cluster of %s instances\n",
          cluster.getInstances().size());
      out.println(cluster);
     
      // print ssh command. do it for the first 20 instances so that the console
View Full Code Here

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

    config.setProperty("whirr.state-store", "memory");

    ClusterSpec clusterSpec = ClusterSpec.withTemporaryKeys(config);
    ClusterController controller = new ClusterController();

    controller.launchCluster(clusterSpec);
    controller.destroyCluster(clusterSpec);

    DryRun dryRun = DryRunModule.getDryRun();
    ListMultimap<NodeMetadata, RunScriptOnNode> perNodeExecutions = dryRun
        .getExecutions();
View Full Code Here

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

    ClusterSpec spec = getTestClusterSpec();
    ClusterController controller =
      (new ClusterControllerFactory()).create(spec.getServiceName());

    try {
      controller.launchCluster(spec);
      Map<? extends NodeMetadata, ExecResponse> responseMap = controller.runScriptOnNodesMatching(
        spec,
        Predicates.<NodeMetadata>alwaysTrue(),
        exec("cat /tmp/bootstrap-start /tmp/bootstrap-end /tmp/configure-start")
      );
View Full Code Here

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

     * Start the cluster as defined in the configuration file
     */
    HadoopProxy proxy = null;
    try {
      LOG.info("Starting cluster {}", spec.getClusterName());
      Cluster cluster = controller.launchCluster(spec);

      LOG.info("Starting local SOCKS proxy");
      proxy = new HadoopProxy(spec, cluster);
      proxy.start();

View Full Code Here

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

  private ClusterController launchWithConfig(Configuration config)
      throws IOException, InterruptedException, ConfigurationException,
      JSchException {
    ClusterSpec clusterSpec = ClusterSpec.withTemporaryKeys(config);
    ClusterController controller = new ClusterController();
    controller.launchCluster(clusterSpec);
    return controller;
  }

  /**
   * Tests that a simple recipe (the default recipe in a cookbook without any
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.