DISCLAIMER This is a very early version of Cassandra-on-Mesos framework. This document, code behavior, and anything else may change without notice and/or break older installations.
Apache Mesos is a cluster resource manager and scheduler that provides an easy and robust abstraction to run services in your datacenter.
Behind the scenes, Apache Mesos uses Apache ZooKeeper, a distributed configuration store to persist its state. The "state" of Mesos includes everything from configuration to the status and load of individual Mesos nodes, as well as frameworks like Cassandra-Mesos.
For common Mesos terminology, see the Mesosphere Glossary.
The standard way of installing Cassandra involves installing and configuring the operating system, JVM and Cassandra manually on each node in your cluster.
If you want to try Cassandra-on-Mesos on a single development machine, see the Getting Started page.
The Cassandra-on-Mesos framework requires these things before you get started:
Configuring RAM requires the total amount of RAM (used by Mesos for provisioning) and the heap size of the Java VM. Off-heap space that is used by Cassandra and operating system block level cache has to fit into the gap between these two parameters.
Mesos acquires a workspace (a directory) per executor. The workspace is usually recreated when the executor starts, which means the executor gets an empty directory on each start. Because this is not a good behavior when using databases (Cassandra is a database), Mesos 0.22 introduces the ability to allocate multiple permanent disk locations (not ephemeral) that can be reused when the executor restarts.
Apache Mesos is not aware of the different data centers or racks on its own like Apache Cassandra. Currently,
Cassandra-on-Mesos does not support multiple datacenters or racks. To enable this feature in a future release of
Cassandra-on-Mesos, we've chosen to use the
GossipingPropertyFileSnitch by default and to make datacenter and
rack name configurable.
In summary, the Cassandra-on-Mesos framework performs the following tasks:
Apache Cassandra ships with the useful tools
cassandra-stress. These tools usually require you
to pass in the nodes that you want to connect to. This becomes a bit complicated with Mesos because Cassandra nodes might
be running on a node with an arbitrary IP address.
Cassandra-on-Mesos provides two features to solve this problem:
To use these features, you need these tools:
To run the above tools do the following:
com-cqlshinstead. You can pass all
com-cqlsh, except host and port.
com-nodetoolinstead. You can pass all
com-nodetool, except host and port. Important JMX security issue since version 2.1.4 (and 2.0.14) Cassandra no longer exposes the JMX port to all interfaces but only to the loopback address. See readme for details.
com-stressinstead. You can pass all
com-stress,except host and port.
The REST API endpoint chooses the nodes from the set of live nodes randomly. If you use
against a specific node, you must find that node's IP address and use
nodetool as usual.
Running Cassandra tools like the many
sstable* tools in
tools/bin is currently more difficult.
You must log onto a slave node,
cd to the sandbox directory and execute the tools there.
You can retrieve the sandbox directory for a slave node from the Cassandra-on-Mesos REST API or from the Mesos web UI.
Cassandra-on-Mesos provides a tool to collect and download information from all of your Cassandra nodes into
a single directory.
com-qa-report downloads the log files from the executor (
system.log), and the results of
tpstats of each node into a single
This should make debugging and bug hunting a bit easier for you and us.
Note, that it
com-qa-report requires the JMX port to be accessible from the host executing
This list highlights some administrative features that are performed by Cassandra-on-Mesos.
--partitioner-range --full --in-local-dc --sequentialoptions. A maximum of one node will perform a repair at any time. No cleanup will "disturb" the cluster-wide repair.
To use the Cassandra cluster in your application, an extension to the DataStax Java Driver has been developed.
// Place the base-URI of the Cassandra-on-Mesos REST API here. // It usually looks like this: http://22.214.171.124:18080/ String httpServerBaseUri = "http://126.96.36.199:18080/"; // Specify how many live nodes you want to provide to the Cluster.Builder instance. int numberOfContactPoints = 3; Cluster.Builder clusterBuilder = CassandraOnMesos.forClusterBuilder(Cluster.builder()) .withApiEndpoint(httpServerBaseUri) .withNumberOfContactPoints(numberOfContactPoints) .build();
sstableupgrade- so major software upgrades are a much harder task.