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

Jonathan Ellis commented on CASSANDRA-3709:
-------------------------------------------

Here's the one we have in the DataStax docs.  It could stand a little 
improvement, e.g. adding a help section, being more graceful w/ non integer 
input.

{{
#! /usr/bin/python
import sys
if (len(sys.argv) > 1):
    num=int(sys.argv[1])
else:
    num=int(raw_input("How many nodes are in your cluster? "))
for i in range(0, num):
    print 'token %d: %d' % (i, (i*(2**127)/num))
}}
                
> Add a token generator to standard tools
> ---------------------------------------
>
>                 Key: CASSANDRA-3709
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3709
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>            Reporter: Jonathan Ellis
>            Assignee: paul cannon
>            Priority: Minor
>             Fix For: 1.1
>
>
> We recommend spacing nodes in a new cluster evenly around the ring; we should 
> provide a tool to generate appropriate tokens for a cluster of size X.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to