You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Donna Li <do...@utstar.com> on 2011/06/10 10:09:42 UTC

toke range

 

Hello all:

         Cassandra use MD5 hash and we can get the token range such as:

Address       Status     Load          Range
Ring

 
142717619497548302610133488236729667990    

10.63.59.71   Up         140.93 KB
38183556207930269037140083379529366016     |<--|

10.63.59.72   Up         133.91 KB
93623288409632417443453979080454166465     |   |

10.63.59.74   Up         178.93 KB
133908707295005027172461791030411347948    |   |

10.63.59.73   Up         100.74 KB
142717619497548302610133488236729667990    |-->|

         If I insert a key donna, and MD5(donna) =
32FF0880C7C75D751D0F9EF3A816EAE2(hex) = 6.6373303140336465e+37(dec),
38183556207930269037140083379529366016     < 6.6373303140336465e+37 <
93623288409632417443453979080454166465,  so the key save in 10.63.59.72.
If the replication is 3, the key is also saved in 10.63.59.74 and
10.63.59.73.  Am I right?

 

Best Regards

Donna li


Re: toke range

Posted by Jonathan Ellis <jb...@gmail.com>.
That would be correct for SimpleStrategy.

On Fri, Jun 10, 2011 at 3:09 AM, Donna Li <do...@utstar.com> wrote:
>
>
> Hello all:
>
>          Cassandra use MD5 hash and we can get the token range such as:
>
> Address       Status     Load
> Range                                      Ring
>
>
> 142717619497548302610133488236729667990
>
> 10.63.59.71   Up         140.93 KB
> 38183556207930269037140083379529366016     |<--|
>
> 10.63.59.72   Up         133.91 KB
> 93623288409632417443453979080454166465     |   |
>
> 10.63.59.74   Up         178.93 KB
> 133908707295005027172461791030411347948    |   |
>
> 10.63.59.73   Up         100.74 KB
> 142717619497548302610133488236729667990    |-->|
>
>          If I insert a key donna, and MD5(donna) =
> 32FF0880C7C75D751D0F9EF3A816EAE2(hex) = 6.6373303140336465e+37(dec),
> 38183556207930269037140083379529366016     < 6.6373303140336465e+37 <
> 93623288409632417443453979080454166465,  so the key save in 10.63.59.72. If
> the replication is 3, the key is also saved in 10.63.59.74 and 10.63.59.73.
>  Am I right?
>
>
>
> Best Regards
>
> Donna li



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com