cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9300) token-generator - generated tokens too long
Date Wed, 13 May 2015 10:16:00 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-9300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14541683#comment-14541683
] 

Stefania commented on CASSANDRA-9300:
-------------------------------------

bq. but ringrange covers the whole range (not the max value). So 1^64 is correct here.

OK, so we need max + 1. Max in murmur is Long.MAX_VALUE (2^63 -1), so plus one it becomes
2^63 and therefore 1<<63 and not 1<<64?

Also, ringrange for the random partitioner is currently set to 1<<127, which is 2^127,
the max in the random partitioner, should this be changed to max +1, 2^127 + 1 then?

> token-generator - generated tokens too long
> -------------------------------------------
>
>                 Key: CASSANDRA-9300
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9300
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>            Priority: Minor
>             Fix For: 3.x, 2.1.x, 2.0.x
>
>         Attachments: 9300-v2.txt, 9300.txt
>
>
> {{token-generator}} tool does not generate valid long values (2.0, 2.1, trunk).
> E.g. 
> {code}
> tools/bin/token-generator 4
> DC #1:
>   Node #1:                                        0
>   Node #2:   42535295865117307932921825928971026432
>   Node #3:   85070591730234615865843651857942052864
>   Node #4:  127605887595351923798765477786913079296
> {code}
> But should generate tokens like
> {code}
> -9223372036854775808
> -4611686018427387904
> 0
> 4611686018427387904
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message