Shift a single-token-per-node architecture to virtual nodes (vnodes) without downtime.
The cassandra-shuffle utility splits up all the contiguous partition ranges (formerly token ranges) for each node and then randomly distributes them into virtual nodes throughout the cluster. Shuffling is a two-phase operation. The utility first schedules the range transfers and then begins transferring the scheduled ranges. You can shuffle on a per-data center basis and mix virtual node-enabled and non-virtual node data centers.
For a complete description of how it works, see the blog Upgrading an existing cluster to vnodes.
In a terminal window:
A good starting point for this parameter is 256.
The node sleeps for RING_DELAY to make sure its view of the ring is accurate, and then splits its current range into the number of specified tokens. However, while the range is split into many tokens, the range remains contiguous; it is still equivalent to what it was before, but with more tokens.
|shuffle [options] <sub-command>|
|create||Initialize the shuffle operation.|
|ls||Lists pending relocations.|
|clear||Clears pending relocations.|
|-dc||--only-dc||Apply only to named DC (create only).|
|-tp||--thrift-port||Thrift port number (Default: 9160).|
|-p||--port||JMX port number (Default: 7199).|
|-tf||--thrift-framed||Enable framed transport for Thrift (Default: false).|
|-en||--and-enable||Immediately enable shuffling (create only).|
|-H||--help||Print help information.|
|-h||--host||JMX hostname or IP address (Default: localhost).|
|-th||--thrift-host||Thrift hostname or IP address (Default: JMX host).|