You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Vijay (JIRA)" <ji...@apache.org> on 2012/10/15 19:24:02 UTC

[jira] [Created] (CASSANDRA-4808) nodetool doesnt work well with -ve tokens

Vijay created CASSANDRA-4808:
--------------------------------

             Summary: nodetool doesnt work well with -ve tokens
                 Key: CASSANDRA-4808
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
             Project: Cassandra
          Issue Type: Bug
          Components: Core
            Reporter: Vijay
            Assignee: Vijay
            Priority: Minor
             Fix For: 1.2.0 beta 1


./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
Unrecognized option: -2253536297082652573
usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
            
 -cf,--column-family <arg>   only take a snapshot of the specified column
                             family


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CASSANDRA-4808) nodetool doesnt work well with negative tokens

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482203#comment-13482203 ] 

Sylvain Lebresne edited comment on CASSANDRA-4808 at 10/23/12 8:42 AM:
-----------------------------------------------------------------------

+1

nit: could be nice to add how to do the escaping in the help of nodetool move (I think that's the only command that take a token as argument).
                
      was (Author: slebresne):
    +1
                  
> nodetool doesnt work well with negative tokens
> ----------------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4808) nodetool doesnt work well with negative tokens

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476369#comment-13476369 ] 

Brandon Williams commented on CASSANDRA-4808:
---------------------------------------------

I'm confused as to why we need negative tokens.
                
> nodetool doesnt work well with negative tokens
> ----------------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CASSANDRA-4808) nodetool doesnt work well with negative tokens

Posted by "Vijay (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476322#comment-13476322 ] 

Vijay edited comment on CASSANDRA-4808 at 10/16/12 6:29 AM:
------------------------------------------------------------

There are 2 option, 

Make nt to accept '-' by making "Options" ignore any -xxxx values (dont verify if they are valid options), this can cause confusion on other commands.

Other option (Attached patch) is to support escape character for '-' 
{code}
Example: ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \\-2253536297082652571
{code}
                
      was (Author: vijay2win@yahoo.com):
    There are 2 option, 

Make nt to accept '-' by making "Options" ignore any -xxxx values (dont verify if they are valid options), this can cause confusion on other commands.

Other option (Attached patch) is to support escape character for '-' 
Example: ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \\-2253536297082652571
                  
> nodetool doesnt work well with negative tokens
> ----------------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4808) nodetool doesnt work well with negative tokens

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-4808:
--------------------------------------

    Fix Version/s:     (was: 1.2.0 beta 1)
                   1.2.0 beta 2
    
> nodetool doesnt work well with negative tokens
> ----------------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4808) nodetool doesnt work well with -ve tokens

Posted by "Vijay (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vijay updated CASSANDRA-4808:
-----------------------------

    Attachment: 0001-CASSANDRA-4808.patch

There are 2 option, 

Make nt to accept '-' by making "Options" ignore any -xxxx values (dont verify if they are valid options), this can cause confusion on other commands.

Other option (Attached patch) is to support escape character for '-' 
Example: ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \\-2253536297082652571
                
> nodetool doesnt work well with -ve tokens
> -----------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CASSANDRA-4808) nodetool doesnt work well with negative tokens

Posted by "Vijay (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476414#comment-13476414 ] 

Vijay edited comment on CASSANDRA-4808 at 10/15/12 8:33 PM:
------------------------------------------------------------

M3P supports -ve tokens the range is from Long.MIN_VALUE to Long.MAX_VALUE, 

explanation is in 
https://issues.apache.org/jira/browse/CASSANDRA-4621?focusedCommentId=13452829&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13452829

Example for generating tokens:

For RandomPartitioner

Node 0	: 0
Node 1	: 56713727820156410577229101238628035242
Node 2	: 113427455640312821154458202477256070484

For Murmur3Partitioner

Node 0	: 0
Node 1	: 6148914691236517204
Node 2	: -6148914691236517208
                
      was (Author: vijay2win@yahoo.com):
    M3P supports -ve tokens the range is from Long.MIN_VALUE to Long.MAX_VALUE, 

explanation is in 
https://issues.apache.org/jira/browse/CASSANDRA-4621?focusedCommentId=13452829&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13452829

                  
> nodetool doesnt work well with negative tokens
> ----------------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4808) nodetool doesnt work well with negative tokens

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-4808:
----------------------------------------

    Summary: nodetool doesnt work well with negative tokens  (was: nodetool doesnt work well with -ve tokens)
    
> nodetool doesnt work well with negative tokens
> ----------------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4808) nodetool doesnt work well with negative tokens

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476786#comment-13476786 ] 

Sylvain Lebresne commented on CASSANDRA-4808:
---------------------------------------------

bq. I'm confused as to why we need negative tokens.

To elaborate, M3P uses a long token internally and since long in java are signed, we end up with a tokens that can be negative. We could chose to interpret the long as unsigned, but even if we do that, we need the minimum token to not be a valid token, so tokens would have to be a value in [1, 2^64-1], not [0, 2^64-1] and so people would have to adapt whatever algorithm they use to compute tokens anyway and hence I'm not sure it's worth bothering changing from negative tokens.
                
> nodetool doesnt work well with negative tokens
> ----------------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4808) nodetool doesnt work well with negative tokens

Posted by "Vijay (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476414#comment-13476414 ] 

Vijay commented on CASSANDRA-4808:
----------------------------------

M3P supports -ve tokens the range is from Long.MIN_VALUE to Long.MAX_VALUE, 

explanation is in 
https://issues.apache.org/jira/browse/CASSANDRA-4621?focusedCommentId=13452829&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13452829

                
> nodetool doesnt work well with negative tokens
> ----------------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4808) nodetool doesnt work well with negative tokens

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482203#comment-13482203 ] 

Sylvain Lebresne commented on CASSANDRA-4808:
---------------------------------------------

+1
                
> nodetool doesnt work well with negative tokens
> ----------------------------------------------
>
>                 Key: CASSANDRA-4808
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4808
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>             Fix For: 1.2.0 beta 2
>
>         Attachments: 0001-CASSANDRA-4808.patch
>
>
> ./apache-cassandra-1.2.0-beta1-SNAPSHOT/bin/nodetool move \-2253536297082652573
> Unrecognized option: -2253536297082652573
> usage: java org.apache.cassandra.tools.NodeCmd --host <arg> <command>
>             
>  -cf,--column-family <arg>   only take a snapshot of the specified column
>                              family

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira