Examples of ClusterSpec


Examples of org.apache.whirr.ClusterSpec

  }

  @Override
  protected void beforeConfigure(ClusterActionEvent event)
      throws IOException, InterruptedException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Cluster cluster = event.getCluster();
    int port = defaultPort;
    if (configKeyPort != null) {
      port = getConfiguration(clusterSpec).getInt(configKeyPort, defaultPort);
    }
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

  @Override
  protected void beforeConfigure(ClusterActionEvent event) throws IOException {
    LOG.info("Configure Solr");

    ClusterSpec clusterSpec = event.getClusterSpec();
    Configuration config = getConfiguration(clusterSpec, SOLR_DEFAULT_CONFIG);

    int jettyPort = config.getInt(SOLR_JETTY_PORT);

    // Open up Jetty port
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

    handleFirewallRules(event);
  }

  @Override
  protected void beforeStart(ClusterActionEvent event) throws IOException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Configuration config = getConfiguration(clusterSpec, SOLR_DEFAULT_CONFIG);

    String solrConfigTarballUrl = prepareRemoteFileUrl(event, config.getString(SOLR_CONFIG_TARBALL_URL));
    LOG.info("Preparing solr config tarball url {}", solrConfigTarballUrl);
    addStatement(event, call("install_tarball_no_md5", solrConfigTarballUrl, SOLR_HOME));
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

    ));
  }

  @Override
  protected void afterStart(ClusterActionEvent event) throws IOException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Cluster cluster = event.getCluster();
    Configuration config = getConfiguration(clusterSpec, SOLR_DEFAULT_CONFIG);
    int jettyPort = config.getInt(SOLR_JETTY_PORT);
    LOG.info("Completed configuration of {}", clusterSpec.getClusterName());
    LOG.info("Solr Hosts: {}", getHosts(cluster.getInstancesMatching(role(SOLR_ROLE)), jettyPort));
  }
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

    LOG.info("Solr Hosts: {}", getHosts(cluster.getInstancesMatching(role(SOLR_ROLE)), jettyPort));
  }

  @Override
  protected void beforeStop(ClusterActionEvent event) throws IOException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Configuration config = getConfiguration(clusterSpec, SOLR_DEFAULT_CONFIG);
    int jettyStopPort = config.getInt(SOLR_JETTY_STOP_PORT);
    String stopFunc = getStopFunction(config, getRole(), "stop_" + getRole());
    LOG.info("Stopping Solr");
    addStatement(event, call(stopFunc,
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

  @Test(expected = IllegalArgumentException.class)
  public void testEmptyInstanceTemplates() throws Exception {
    T action = newClusterActionInstance(EMPTYSET, EMPTYSET);
    DryRun dryRun = getDryRunForAction(action).reset();

    ClusterSpec tempSpec = ClusterSpec.withTemporaryKeys();

    tempSpec.setClusterName("test-cluster-for-script-exection");
    tempSpec.setProvider("stub");
    tempSpec.setIdentity("dummy");
    tempSpec.setStateStore("none");

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

   
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

  }
 
  @Override
  protected void beforeConfigure(ClusterActionEvent event) throws IOException,
      InterruptedException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Configuration conf = getConfiguration(clusterSpec);
    handleFirewallRules(event);
    addStatement(event, call(getStartFunction(conf, "mr_jobhistory", "start_mr_jobhistory"), "historyserver"));
  }
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

  }
 
  @Override
  protected void beforeConfigure(ClusterActionEvent event) throws IOException,
      InterruptedException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Configuration conf = getConfiguration(clusterSpec);
    Cluster cluster = event.getCluster();
   
    Set<Instance> nodeManagers = cluster.getInstancesMatching(role(ROLE));
    if (!nodeManagers.isEmpty()) {
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

    return getConfigureFunction(config, getRole(), GangliaCluster.CONFIGURE_FUNCTION);
  }

  @Override
  protected void beforeBootstrap(ClusterActionEvent event) throws IOException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Configuration config = getConfiguration(clusterSpec);

    addStatement(event, call("retry_helpers"));
    addStatement(event, call(getInstallFunction(config),
      "-r", GANGLIA_MONITOR_ROLE)
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

    );
  }

  @Override
  protected void beforeConfigure(ClusterActionEvent event) throws IOException, InterruptedException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Cluster cluster = event.getCluster();

    event.getFirewallManager().addRule(
        Rule.create().destination(role(GANGLIA_MONITOR_ROLE)).port(GANGLIA_MONITOR_PORT)
    );
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.