How to install Cassandra on RHEL

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.

How to install Cassandra on RHEL

Continue reading How to install Cassandra on RHEL

How to change the cluster name in Apache Cassandra

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

How to change the cluster name in Apache Cassandra

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.

Video link for the same:

How to find the list of keyspaces in Cassandra

In this article, we will see how to find the list of keyspaces in Cassandra using different methods.

We can find the list of keyspaces in Apache Cassandra using decribe or running select statement.

How to find the list of keyspaces in Cassandra

1.Find the keyspaces in Cassandra using describe command.

describe keyspaces;

How to find the list of keyspaces in Cassandra

2. Find the list of keyspaces in Apache Cassandra using select statement.

select * from system_schema.keyspaces;

How to rename keyspace 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.