cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Borgström <>
Subject In place vnode conversion possible?
Date Tue, 16 Dec 2014 08:38:28 GMT

I know that adding a new vnode enabled DC is the recommended method to
convert and existing cluster to vnode. And that the cassandra-shuffle
utility has been removed.

That said, I've done some testing and it appears to be possible to
perform an in place conversion as long as all nodes contain all data (3
nodes and replication factor 3 for example) like this:

for each node:
- nodetool -h localhost disablegossip (Not sure if this is needed)

- cqlsh localhost
  UPDATE system.local SET tokens=$NEWTOKENS WHERE key='local';

- nodetool -h localhost disablethrift (Not sure if this is needed)
- nodetool -h localhost drain
- service cassandra restart

And the following python snippet was used to generate $NEWTOKENS for
each node (RandomPartitioner):
import random
print str([str(x) for x in sorted(random.randint(0,2**127-1) for x in
range(256))]).replace('[', '{').replace(']', '}')

I've tested this in a test cluster and it seems to work just fine.

Has anyone else done anything similar?

Or if manually changing tokens is impossible and something horrible will
hit me down the line?

Test cluster configuration
Cassandra version: 1.2.19
Number of nodes: 3
Keyspace: NetworkTopologyStrategy:  {DC1: 1, DC2:1, DC3: 1}

/ Jonas

View raw message