cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Bialek <bial...@gmail.com>
Subject Token distribution with vnodes and Murmur3Partitioner
Date Wed, 30 Jan 2019 10:03:27 GMT
Hi,

I have a question regarding token distribution with vnodes and 
Murmur3Partitioner.

According to the documentation, the Murmur3Partitioner generates tokens 
in the range from -9223372036854775808 to 9223372036854775807.

I have the following environment, _simplified_ for demo purposes:

- two nodes: 127.0.0.1, 127.0.0.3
- each node with "num_tokens: 4"

The current token distribution:

nodetool describering keyspace1 | grep start_token | awk -F ',' '{print 
$1 $2 $3 $4}' | sed "s/^.*TokenRange(//" | sort -t : -k 2 -n

start_token:-4188186923391804009 end_token:-2968565815223985499 
endpoints:[127.0.0.3] rpc_endpoints:[127.0.0.3]
start_token:-2968565815223985499 end_token:-2460262601845894723 
endpoints:[127.0.0.1] rpc_endpoints:[127.0.0.1]
start_token:-2460262601845894723 end_token:-631926979124124468 
endpoints:[127.0.0.1] rpc_endpoints:[127.0.0.1]
start_token:-631926979124124468 end_token:1534223405564637340 
endpoints:[127.0.0.1] rpc_endpoints:[127.0.0.1]
start_token:1534223405564637340 end_token:4324877682244753963 
endpoints:[127.0.0.3] rpc_endpoints:[127.0.0.3]
start_token:4324877682244753963 end_token:8553011735120756693 
endpoints:[127.0.0.3] rpc_endpoints:[127.0.0.3]
start_token:8553011735120756693 end_token:9030094374857346834 
endpoints:[127.0.0.3] rpc_endpoints:[127.0.0.3]
start_token:9030094374857346834 end_token:-4188186923391804009 
endpoints:[127.0.0.1] rpc_endpoints:[127.0.0.1]

Question 1:

Is my assumption correct, that each vnode is assigned tokens in the 
range: start_token+1 - end_token ?

If we take this particular vnode as an example:

start_token:8553011735120756693 end_token:9030094374857346834 
endpoints:[127.0.0.3] rpc_endpoints:[127.0.0.3]

the assigned token range would be: from 8553011735120756694 to 
9030094374857346834, right?

Question 2:

Is my assumption correct, that token values between:

9030094374857346834 and 9223372036854775807 (max. value generated by 
Murmur3Partitioner), as well as -9223372036854775808 (min. value 
generated by Murmur3Partitioner) and -4188186923391804009 are assigned 
to the following vnode:

start_token:9030094374857346834 end_token:-4188186923391804009 
endpoints:[127.0.0.1] rpc_endpoints:[127.0.0.1]

Thank you,
Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org


Mime
View raw message