35. #Cassandra13
Strategy
fixed partition assignment
● Namespace divided into Q evenly-sized partitions
● Q/N partitions assigned per host (where N is number of hosts)
● Joining hosts “steal” partitions evenly from existing hosts
● Used by Dynamo/Voldemort (“strategy 3” in Dynamo paper)
36. #Cassandra13
Strategy
random token assignment
● Each host assigned T random tokens
● T random tokens generated for joining hosts; New tokens divide
existing ranges
● Similar to libketama; Identical to Classic Cassandra when T=1
45. #Cassandra13
Configuration
nodetool info
Token : (invoke with -T/--tokens to see all 256 tokens)
ID : 6a8dc22c-1f37-473f-8f7e-47742f4b83a5
Gossip active : true
Thrift active : true
Load : 42.92 MB
Generation No : 1370016307
Uptime (seconds) : 221
Heap Memory (MB) : 998.72 / 1886.00
Data Center : datacenter1
Rack : rack1
Exceptions : 0
Key Cache : size 1128 (bytes), capacity 98566144 (bytes), 42 hits, 54 re...
Row Cache : size 0 (bytes), capacity 0 (bytes), 0 hits, 0 requests, NaN ...
46. #Cassandra13
Configuration
nodetool ring
Datacenter: datacenter1
==========
Replicas: 0
Address Rack Status State Load Owns Token
3074457345618258602
127.0.0.1 rack1 Up Normal 42.92 MB 33.33% -9223372036854775808
127.0.0.1 rack1 Up Normal 42.92 MB 33.33% 3098476543630901247
127.0.0.1 rack1 Up Normal 42.92 MB 33.33% 3122495741643543892
127.0.0.1 rack1 Up Normal 42.92 MB 33.33% 3146514939656186537
127.0.0.1 rack1 Up Normal 42.92 MB 33.33% 3170534137668829183
127.0.0.1 rack1 Up Normal 42.92 MB 33.33% 3194553335681471828
127.0.0.1 rack1 Up Normal 42.92 MB 33.33% 321857253369411447
127.0.0.1 rack1 Up Normal 42.92 MB 33.33% 3242591731706757118
...
55. #Cassandra13
Shuffle
Usage: shuffle [options] <sub-command>
Sub-commands:
create Initialize a new shuffle operation
ls List pending relocations
clear Clear pending relocations
en[able] Enable shuffling
dis[able] Disable shuffling
Options:
-dc, --only-dc Apply only to named DC (create only)
-u, --username JMX username
-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)
-pw, --password JMX password
-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)