In this article, we will see how to install Cassandra on RHEL step by step.
What is Apachae Cassandra]
Cassandra is a NoSQL distributed database. By design, NoSQL databases are lightweight, open-source, non-relational, and largely distributed. Counted among their strengths are horizontal scalability, distributed architectures, and a flexible approach to schema definition.
In this article, we will see how to change the cluster name in Apache Cassandra step by step. Default name for Apache Cassnadra cluster is Test Cluster. Changing cluster name is Cassandra cluster level setting.
How to change the cluster name in Apache Cassandra
1. Changing cluster name is Cassandra cluster level setting. So, it is always good practice to take backup of cassandra.yaml file in /etc/cassandra directory.
cd /etc/cassandra/
cp cassandra.yaml cassandra_backup.yaml
2. Now connect to Cassandra using cqlsh and run the below command.
update system.local set cluster_name = 'EMEA' where key='local';
3. Now exit from cqlsh and from Linux terminal run the below command.
nodetool flush -- system
4. Now stop cassandra service.
sudo systemctl stop cassandra
5. Now we have to change the value for setting ‘cluster_name’ in cassandra.yaml file and save the file.
cluster_name: 'EMEA'
6. Then, start the Apache Cassandra on Linux.
sudo systemctl start cassandra
7. Now, connect cassandra using cqlsh. There you can see the new cluster name of Apache Cassandra node.
In this video, we will how to switch one keyspace to another in Cassandra step by step.
We can use USE command to switch from one keyspace to other in Apache Cassandra. The USE statement changes the current keyspace to the specified keyspace.
How to switch one keyspace to another in Cassandra
In this article, we will see How to rename keyspace in Cassandra.
How to rename keyspace in Cassandra
Keyspace name cannot be altered in Cassandra. Strategy Name: Strategy name can be altered by using a new strategy name. Replication Factor: Replication factor can be altered by using a new replication factor.
Renaming keyspaces (and column families) is no longer supported, since it was prone to race conditions.
In this article, we will see how to start and stop Cassandra in Linux step by step. We can use service or systemctl to start stop and restart or check the status of Cassandra service on Linux.