Reputation: 647
I am new at Cassandra, and I believe I setup all the configurations. Now after reading for a while I came across a setup article, and I found a difference between my setup and what was being explained.
Here is a Screenshot my configuration.
Now my question is, what is Tokens for? and How can I change it to 256?
Thanks a lot in advance!
Upvotes: 1
Views: 4807
Reputation: 9475
If you use the virtual nodes features, then you can set the number of tokens to a value like 256, and this will allow Cassandra to automatically load balance your data when nodes are added or removed from a cluster.
There are two fields in cassandra.yaml that control the use of virtual nodes: ".. don’t set the initial_token
parameter in your conf/cassandra.yaml and instead enable the num_tokens
parameter. A good default value for this is 256." See more information here. You would also generally set partitioner: org.apache.cassandra.dht.Murmur3Partitioner
If you want to change the number of virtual nodes on an existing node, you need to rebuild the data on the node. See this.
Upvotes: 1