As you should recall from Chapter 4, Data Centers, the snitch tells Cassandra what your network topology looks like, and therefore, affects data placement in the cluster. If you haven't inserted any data, you can change the snitch without consequence. Otherwise multiple steps are required, as is a full cluster restart, which will result in downtime.
The following procedure should be used to change snitches:
Update your topology properties files, which means
cassandra-topology.properties
orcassandra-rackdc.properties
, depending on which snitch you specify. In the case of thePropertyFileSnitch
, make sure all nodes have the same file. ForGossipingPropertyFileSnitch
orEC2MultiRegionSnitch
, each node should have a file indicating its place in the topology.Update the snitch in
cassandra.yaml
. You will need to do this for every node in the cluster.Restart all nodes, one at a time. Any time you make a change to
cassandra.yaml
, you must restart the node.Change the replication strategy...