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

    LOG.info("Authorizing firewall");
    Instance instance = cluster.getInstanceMatching(role(ROLE));
    InetAddress masterPublicAddress = instance.getPublicAddress();
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

        HamaConstants.PARAM_TARBALL_URL, tarurl));
  }

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

    LOG.info("Completed configuration of {}", clusterSpec.getClusterName());
    Instance instance = cluster.getInstanceMatching(role(ROLE));
    InetAddress masterPublicAddress = instance.getPublicAddress();

    LOG.info("BSPMaster web UI available at http://{}:{}", masterPublicAddress
        .getHostName(), MASTER_WEB_UI_PORT);
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

      throws InterruptedException, IOException {

    final String phaseName = getAction();
    final Collection<Future<ExecResponse>> futures = Sets.newHashSet();

    final ClusterSpec clusterSpec = eventMap.values().iterator().next().getClusterSpec();

    final RunScriptOptions options = overrideLoginCredentials(LoginCredentials.builder().user(clusterSpec.getClusterUser())
                                                              .privateKey(clusterSpec.getPrivateKey()).build());
    for (Map.Entry<InstanceTemplate, ClusterActionEvent> entry : eventMap.entrySet()) {
      if (shouldIgnoreInstanceTemplate(entry.getKey())) {
        continue; // skip if not in the target
      }
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

      printUsage(err);
      return -1;
    }

    try {
      ClusterSpec clusterSpec = getClusterSpec(optionSet);
      printProviderInfo(out, err, clusterSpec, optionSet);
      return run(in, out, err, clusterSpec);

    } catch (IllegalArgumentException e) {
      printErrorAndHelpHint(err, e);
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

    return getConfiguration(spec, "whirr-zookeeper-default.properties");
  }

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

    addStatement(event, call("retry_helpers"));
    addStatement(event, call("install_tarball"));
    addStatement(event, call("install_service"));
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(ZOOKEEPER_ROLE)).port(CLIENT_PORT)
    );
View Full Code Here

Examples of org.apache.whirr.ClusterSpec

    addStatement(event, call(getConfigureFunction(config), servers));
  }

  @Override
  protected void afterConfigure(ClusterActionEvent event) {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Cluster cluster = event.getCluster();

    LOG.info("Completed configuration of {}", clusterSpec.getClusterName());
    String hosts = Joiner.on(',').join(getHosts(cluster.getInstancesMatching(
        role(ZOOKEEPER_ROLE))));
    LOG.info("Hosts: {}", hosts);
  }
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

    event.getFirewallManager().addRule(Rule.create().destination(role(SOLR_ROLE)).port(jettyPort));
  }

  @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
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.