cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-3709) Add a token generator to standard tools
Date Fri, 06 Jan 2012 18:30:39 GMT

    [ 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

        

Mime
View raw message