org.apache.whirr.service.cassandra
Class CassandraClusterActionHandler
java.lang.Object
org.apache.whirr.service.ClusterActionHandlerSupport
org.apache.whirr.service.cassandra.CassandraClusterActionHandler
- All Implemented Interfaces:
- ClusterActionHandler
public class CassandraClusterActionHandler
- extends ClusterActionHandlerSupport
Methods inherited from class org.apache.whirr.service.ClusterActionHandlerSupport |
addRunUrl, addStatement, afterAction, afterBootstrap, afterCleanup, afterConfigure, afterDestroy, afterOtherAction, afterStart, afterStop, beforeAction, beforeDestroy, beforeOtherAction, equals, getCleanupFunction, getConfiguration, getConfiguration, getConfigureFunction, getFunctionName, getInstallFunction, getStartFunction, getStopFunction, hashCode, prepareRemoteFileUrl, toString |
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
CassandraClusterActionHandler
public CassandraClusterActionHandler()
getRole
public String getRole()
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
beforeStart
protected void beforeStart(ClusterActionEvent event)
- Overrides:
beforeStart
in class ClusterActionHandlerSupport
beforeStop
protected void beforeStop(ClusterActionEvent event)
- Overrides:
beforeStop
in class ClusterActionHandlerSupport
beforeCleanup
protected void beforeCleanup(ClusterActionEvent event)
- Overrides:
beforeCleanup
in class ClusterActionHandlerSupport
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:
instances
- all nodes in cluster
- Returns:
- list of seeds
computeInitialTokens
protected List<String> computeInitialTokens(int numberOfNodes)
- Compute initial_token for a balanced cluster
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.