Package org.apache.whirr

Examples of org.apache.whirr.Cluster$Instance


  }
 
  @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(GANGLIA_MONITOR_ROLE))));
    LOG.info("Monitors: {}", hosts);
  }
View Full Code Here


    addStatement(event, call(FUNCTION_INSTALL, optArgs.toArray(new String[optArgs.size()])));
  }

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

    LOG.info("Authorizing firewall");
    event.getFirewallManager().addRule(
      Rule.create()
        .destination(cluster.getInstancesMatching(role(ROLE)))
        .ports(CLIENT_PORT, ADMIN_PORT, HTTP_PORT)
    );

    handleFirewallRules(event);

    String servers = Joiner.on(' ').join(getPrivateIps(cluster.getInstances()));

    Configuration config = event.getClusterSpec().getConfiguration();
    int partitionsPerNode = config.getInt(PARAM_PARTITIONS_PER_NODE, 10);

    addStatement(event, call("retry_helpers"));
View Full Code Here

  }

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

    String servers = Joiner.on(' ').join(getPrivateIps(cluster.getInstances()));

    LOG.info("Completed setup of Voldemort {} with servers {}",
        clusterSpec.getClusterName(), servers);
  }
View Full Code Here

  }

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

    // FIXME: the ganglia port is only opened so the ganglia xml dump can be checked in GangliaServiceTest
    event.getFirewallManager().addRule(
        Rule.create().destination(role(GANGLIA_METAD_ROLE)).ports(HTTP_PORT, GANGLIA_META_PORT)
    );

    handleFirewallRules(event);

    Configuration config = getConfiguration(clusterSpec);
    String configureFunction = getConfigureFunction(config);

    // Call the configure function.
    String metadHost = cluster.getInstanceMatching(role(GANGLIA_METAD_ROLE)).getPrivateIp();
    addStatement(event, call("retry_helpers"));
    addStatement(event, call(configureFunction, "-m", metadHost));
  }
View Full Code Here

  }
 
  @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(GANGLIA_METAD_ROLE))));
    LOG.info("Meta host: {}. You should be able to connect on http://{}/ganglia", hosts, hosts);
  }
View Full Code Here

  @Override
  protected void beforeConfigure(ClusterActionEvent event) throws IOException,
      InterruptedException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Configuration conf = getConfiguration(clusterSpec);
    Cluster cluster = event.getCluster();
   
    Instance resourceManager = cluster.getInstanceMatching(role(ROLE));
    event.getFirewallManager().addRules(
        Rule.create()
          .destination(resourceManager)
          .ports(RESOURCE_MANAGER_RPC_PORT, RESOURCE_MANAGER_WEB_UI_PORT),
        Rule.create()
View Full Code Here

  }
 
  @Override
  protected void afterConfigure(ClusterActionEvent event) throws IOException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Cluster cluster = event.getCluster();
    Instance resourceManager = cluster.getInstanceMatching(role(ROLE));
    LOG.info("Resource manager web UI available at http://{}:{}",
      resourceManager.getPublicHostName(), RESOURCE_MANAGER_WEB_UI_PORT);
   
    Properties mrConfig = createClientSideMapReduceProperties(clusterSpec);
    createClientSideMapReduceSiteFile(clusterSpec, mrConfig);

    Properties yarnConfig = createClientSideYarnProperties(clusterSpec, resourceManager);
    createClientSideYarnSiteFile(clusterSpec, yarnConfig);

    Properties combined = new Properties();
    combined.putAll(cluster.getConfiguration());
    combined.putAll(mrConfig);
    combined.putAll(yarnConfig);
    event.setCluster(new Cluster(cluster.getInstances(), combined));
  }
View Full Code Here

  }

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

    event.getFirewallManager().addRule(
      Rule.create()
        .destination(cluster.getInstancesMatching(role(ROLE)))
        .port(HTTP_CLIENT_PORT)
    );

    handleFirewallRules(event);
View Full Code Here

  }

  @Override
  protected void beforeConfigure(final ClusterActionEvent event)
    throws IOException, InterruptedException {
    Cluster cluster = event.getCluster();
    Set<Instance> instances = cluster.getInstancesMatching(role(CASSANDRA_ROLE));

    event.getFirewallManager().addRule(
      Rule.create()
        .destination(instances)
        .ports(CLIENT_PORT, JMX_PORT)
View Full Code Here

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

    Instance instance = cluster
        .getInstanceMatching(role(HamaMasterClusterActionHandler.ROLE));
    InetAddress masterPublicAddress = instance.getPublicAddress();

    event.getFirewallManager().addRules(
        Rule.create().destination(instance).ports(GROOMSERVER_PORT));
View Full Code Here

TOP

Related Classes of org.apache.whirr.Cluster$Instance

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.