Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38924CA53 for ; Fri, 1 Nov 2013 14:40:41 +0000 (UTC) Received: (qmail 63396 invoked by uid 500); 1 Nov 2013 14:37:12 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 63264 invoked by uid 500); 1 Nov 2013 14:36:58 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 63234 invoked by uid 99); 1 Nov 2013 14:36:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Nov 2013 14:36:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_QUOTING X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.212.180] (HELO mail-wi0-f180.google.com) (209.85.212.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Nov 2013 14:36:50 +0000 Received: by mail-wi0-f180.google.com with SMTP id ey11so1169359wid.1 for ; Fri, 01 Nov 2013 07:36:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=P9PnTLtu+CqH2/O0rb2taNAHKfNOF/BQSdXDKIQDbXs=; b=VsR8ZLb7h5jxcx5k9BfLcAiBxDMPBcDPvvcvz767upim6mZZqlAzga9ZDM1w5HluhX zimZUxAEc9VT3Wtu7XjdsN+FP9BRzA/CvujpYtlabpCx2IWQDy/QYwR+Sg2Jv1m1owhH YjwXuESBC/FcrfwLjPlUDLzEAf5e/L9kn0cHgBSmkX1OOCnBuWHc+QQ6ueH3sB69VXbs 3k27GNMTrPfQhnE4jmfXZPEiwCXbmnj2nOIYt4CJ8ujyqgZXVCObcdqEk0AbQBPhA0nO LIMZWi7kOO4BAQSNjUOOxea8wKbn/BGBhygQgc1NbOdsZJHU6ZXF6AhTvn9SfdQBuj/k v9kQ== X-Gm-Message-State: ALoCoQkI9oTCJ/QXQuN0Hzhyd3IyIvj7BeDKcl77X1NjcpKM7K9J4DoP41QQ8KbOJmRi1d1g6akA MIME-Version: 1.0 X-Received: by 10.194.110.138 with SMTP id ia10mr2728043wjb.3.1383316588540; Fri, 01 Nov 2013 07:36:28 -0700 (PDT) Received: by 10.227.1.72 with HTTP; Fri, 1 Nov 2013 07:36:28 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 Nov 2013 07:36:28 -0700 Message-ID: Subject: Re: How to generate tokens for my two node Cassandra cluster? From: Peter Sanford To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=047d7bf10aa8df4ec504ea1e7dc0 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bf10aa8df4ec504ea1e7dc0 Content-Type: text/plain; charset=UTF-8 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 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 "", line 1 > num=2; print "\n".join([("token %d: %d" %(i,(i*(2**127)/num))) for > i in range(0,num)]) > ^ > SyntaxError: invalid syntax > > > --047d7bf10aa8df4ec504ea1e7dc0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I can't tell you why that one-liner isn't working,= but you can try=C2=A0http://www.c= assandraring.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 dat= astax 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 -

=C2=A0=C2=A0=C2=A0 python -c "num=3D2; print "= "\n"".join([(""token %d: %d"" %(i,(i*(2*= *127)/num))) for i in range(0,num)])"


I always get this error -

=C2=A0=C2=A0=C2=A0 C:\Users\usern= ame>python -c "num=3D2; print ""\n"".join([(&qu= ot;"token %d: %d"" %(i,(i*(2**127)/num))) for i
=C2=A0=C2= =A0=C2=A0 in range(0,num)])"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 File "<string>", line 1
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 num=3D2; print "\n".jo= in([("token %d: %d" %(i,(i*(2**127)/num))) for i in range(0,num)]= )
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^
= =C2=A0=C2=A0=C2=A0 SyntaxError: invalid syntax
=C2=A0=C2=A0=C2=A0


--047d7bf10aa8df4ec504ea1e7dc0--