Database Reference
In-Depth Information
The cluster name
A cluster name is used to logically group nodes that belong to the same cluster. It works as
a name space for nodes. In a multiple-cluster environment, it works as a preventive mech-
anism for nodes of a cluster to join some other clusters when they boot up.
It is always a good idea to give a meaningful name to a cluster, even if you have a single
cluster at the time. Here is an example of how cluster_name can be assigned via cas-
sandra.yaml :
cluster_name: 'MyAppMainCluster'
It is recommended to change the cluster name before you launch the cluster. Changing the
cluster name when the cluster is up and running throws an exception. This is because the
cluster name resides in the system keyspace.
If you have to change the cluster name, there is an unofficial trick to do that. Use cqlsh to
connect to a node. You need to edit the system.local table by running an UPDATE
query as follows:
UPDATE system.local SET cluster_name='new_cluster_name'
WHERE key='local'
After this, you need to perform two steps in the following order:
1. Execute bin/nodetool flush .
2. Change cluster_name in cassandra.yaml to whatever you have used to
update system.local .
After this, restart the node.
Search WWH ::




Custom Search