Cassandra¶
This section is about how to perform a specific task. If you want to understand how a certain component works, please see Reference
The rest of the page assumes you installed using the ansible playbooks from wire-server-deploy
For any command below, first ssh into the server:
This section only covers the bare minimum, for more information, see the cassandra documentation
Check the health of a Cassandra node¶
To check the health of a Cassandra node, run the following command:
or if you are running a newer version of wire-server (altough it should be backwards compatibile)
You should see a list of nodes like this:
A UN
at the begginng of the line, refers to a node that is Up
and Normal
.
You can also check the logs of the cassandra server with
How to inspect tables and data manually¶
If your local install does not have cqlsh available, you can use docker instead:
How to rolling-restart a cassandra cluster¶
For maintenance you may need to restart the cluster.
On each server one by one:
- check your cluster is healthy:
nodetool status
ornodetool -h ::FFFF:127.0.0.1 status
(in newer versions) nodetool drain && systemctl stop cassandra
(to stop accepting writes and flush data to disk; then stop the process)- do any operation you need, if any
- Start the cassandra daemon process:
systemctl start cassandra
- Wait for your cluster to be healthy again.
- Do the same on the next server.