org.apache.whirr.service.cassandra
Class CassandraClusterActionHandler

java.lang.Object
  extended by org.apache.whirr.service.ClusterActionHandler
      extended by org.apache.whirr.service.ClusterActionHandlerSupport
          extended by org.apache.whirr.service.cassandra.CassandraClusterActionHandler

public class CassandraClusterActionHandler
extends ClusterActionHandlerSupport


Field Summary
static String BIN_TARBALL
           
static String CASSANDRA_ROLE
           
static int CLIENT_PORT
           
static int JMX_PORT
           
static String MAJOR_VERSION
           
 
Fields inherited from class org.apache.whirr.service.ClusterActionHandler
BOOTSTRAP_ACTION, CONFIGURE_ACTION, DESTROY_ACTION
 
Constructor Summary
CassandraClusterActionHandler()
           
 
Method Summary
protected  void beforeBootstrap(ClusterActionEvent event)
           
protected  void beforeConfigure(ClusterActionEvent event)
           
 String getRole()
           
protected  List<Cluster.Instance> getSeeds(Set<Cluster.Instance> instances)
          Pick a selection of the nodes that are to become seeds.
 
Methods inherited from class org.apache.whirr.service.ClusterActionHandlerSupport
addRunUrl, addStatement, afterAction, afterBootstrap, afterConfigure, afterDestroy, afterOtherAction, beforeAction, beforeDestroy, beforeOtherAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CASSANDRA_ROLE

public static final String CASSANDRA_ROLE
See Also:
Constant Field Values

CLIENT_PORT

public static final int CLIENT_PORT
See Also:
Constant Field Values

JMX_PORT

public static final int JMX_PORT
See Also:
Constant Field Values

BIN_TARBALL

public static final String BIN_TARBALL
See Also:
Constant Field Values

MAJOR_VERSION

public static final String MAJOR_VERSION
See Also:
Constant Field Values
Constructor Detail

CassandraClusterActionHandler

public CassandraClusterActionHandler()
Method Detail

getRole

public String getRole()
Specified by:
getRole in class ClusterActionHandler

beforeBootstrap

protected void beforeBootstrap(ClusterActionEvent event)
                        throws IOException
Overrides:
beforeBootstrap in class ClusterActionHandlerSupport
Throws:
IOException

beforeConfigure

protected void beforeConfigure(ClusterActionEvent event)
                        throws IOException,
                               InterruptedException
Overrides:
beforeConfigure in class ClusterActionHandlerSupport
Throws:
IOException
InterruptedException

getSeeds

protected List<Cluster.Instance> getSeeds(Set<Cluster.Instance> instances)
Pick a selection of the nodes that are to become seeds. TODO improve selection method. Right now it picks 20% of the nodes as seeds, or a minimum of one node if it is a small cluster.

Parameters:
nodes - all nodes in cluster
Returns:
list of seeds


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.