Re: In place vnode conversion possible?
On 18/12/14 21:45, Robert Coli wrote: On Tue, Dec 16, 2014 at 12:38 AM, Jonas Borgström jo...@borgstrom.se mailto:jo...@borgstrom.se wrote: 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: I would expect this to work, but to stream up to RF x the data around. Why would any streaming take place? Simply changing the tokens and restarting a node does not seem to trigger any streaming. And if I manually trigger a nodetool repair I notice almost no streaming since all nodes were already responsible for 100% of the data (RF = NUM_NODES). / Jonas signature.asc Description: OpenPGP digital signature
Re: In place vnode conversion possible?
On Fri, Dec 19, 2014 at 12:25 AM, Jonas Borgström jo...@borgstrom.se wrote: Why would any streaming take place? Simply changing the tokens and restarting a node does not seem to trigger any streaming. Oh, sorry for not reading the whole mail, I figured you were going to do something less low level hacky. :) That method seems like it would work. Basically in this case (RF=N) shotgun range movement are safe, because nothing's actually moving. =Rob
Re: In place vnode conversion possible?
On Tue, Dec 16, 2014 at 12:38 AM, Jonas Borgström jo...@borgstrom.se wrote: 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: I would expect this to work, but to stream up to RF x the data around. =Rob
In place vnode conversion possible?
Hi, 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 signature.asc Description: OpenPGP digital signature