Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for 
change notification.

The "Operations" page has been changed by BrandonWilliams.
The comment on this change is: Update python to start with token 0.
http://wiki.apache.org/cassandra/Operations?action=diff&rev1=72&rev2=73

--------------------------------------------------

  Here's a python program which can be used to calculate new tokens for the 
nodes. There's more info on the subject at Ben Black's presentation at 
Cassandra Summit 2010. 
http://www.riptano.com/blog/slides-and-videos-cassandra-summit-2010
  
    def tokens(nodes):                        
-       for i in range(1, nodes + 1):         
+       for x in xrange(nodes):         
-           print (i * (2 ** 127 - 1) / nodes)
+           print 2 ** 127 / nodes * x
  
  There's also `nodetool loadbalance`: essentially a convenience over 
decommission + bootstrap, only instead of telling the target node where to move 
on the ring it will choose its location based on the same heuristic as Token 
selection on bootstrap. You should not use this as it doesn't rebalance the 
entire ring.
  

Reply via email to