incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Sutton <ray.sut...@gmail.com>
Subject Re: How to generate tokens for my two node Cassandra cluster?
Date Fri, 01 Nov 2013 14:43:41 GMT
Your quotes need to be escaped:
python -c "num=2; print \"\n\".join([(\"token %d: %d\"
%(i,(i*(2**127)/num))) for i in range(0,num)])"


--
Ray  //o-o\\



On Fri, Nov 1, 2013 at 10:36 AM, Peter Sanford
<psanford@nearbuysystems.com>wrote:

> I can't tell you why that one-liner isn't working, but you can try
> http://www.cassandraring.com for generating balanced tokens.
>
>
> On Thu, Oct 31, 2013 at 11:59 PM, Techy Teck <comptechgeeky@gmail.com>wrote:
>
>> I am trying to setup two node Cassandra Cluster on windows machine. I
>> have basically two windows machine and I was following this datastax
>> tutorial (
>> http://www.datastax.com/2012/01/how-to-setup-and-monitor-a-multi-node-cassandra-cluster-on-windows
>> )
>>
>> Whenever I use the below command to get the token number from the above
>> tutorial -
>>
>>     python -c "num=2; print ""\n"".join([(""token %d: %d""
>> %(i,(i*(2**127)/num))) for i in range(0,num)])"
>>
>>
>> I always get this error -
>>
>>     C:\Users\username>python -c "num=2; print ""\n"".join([(""token %d:
>> %d"" %(i,(i*(2**127)/num))) for i
>>     in range(0,num)])"
>>       File "<string>", line 1
>>         num=2; print "\n".join([("token %d: %d" %(i,(i*(2**127)/num)))
>> for i in range(0,num)])
>>                         ^
>>     SyntaxError: invalid syntax
>>
>>
>>
>

Mime
View raw message