org.apache.whirr.service.cassandra
Class CassandraService
java.lang.Object
org.apache.whirr.service.Service
org.apache.whirr.service.cassandra.CassandraService
public class CassandraService
- extends Service
Method Summary |
String |
getName()
|
protected List<org.jclouds.compute.domain.NodeMetadata> |
getSeeds(List<org.jclouds.compute.domain.NodeMetadata> nodes)
Pick a selection of the nodes that are to become seeds. |
Cluster |
launchCluster(ClusterSpec clusterSpec)
Start the cluster described by clusterSpec and block until the
cluster is
available. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
CassandraService
public CassandraService()
getName
public String getName()
- Specified by:
getName
in class Service
- Returns:
- the unique name of the service.
launchCluster
public Cluster launchCluster(ClusterSpec clusterSpec)
throws IOException
- Description copied from class:
Service
- Start the cluster described by
clusterSpec
and block until the
cluster is
available. It is not guaranteed that the service running on the cluster
has started when this method returns.
- Specified by:
launchCluster
in class Service
- Returns:
- an object representing the running cluster
- Throws:
IOException
- if there is a problem while starting the cluster. The
cluster may or may not have started.
getSeeds
protected List<org.jclouds.compute.domain.NodeMetadata> getSeeds(List<org.jclouds.compute.domain.NodeMetadata> nodes)
- 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 The Apache Software Foundation. All Rights Reserved.