Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 7667 invoked from network); 12 Jul 2010 12:15:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Jul 2010 12:15:27 -0000 Received: (qmail 58536 invoked by uid 500); 12 Jul 2010 12:15:26 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 58385 invoked by uid 500); 12 Jul 2010 12:15:22 -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 58372 invoked by uid 99); 12 Jul 2010 12:15:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jul 2010 12:15:21 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 209.85.210.44 as permitted sender) Received: from [209.85.210.44] (HELO mail-pz0-f44.google.com) (209.85.210.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jul 2010 12:15:14 +0000 Received: by pzk6 with SMTP id 6so1328924pzk.31 for ; Mon, 12 Jul 2010 05:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=QNJSJ31xphwIkLXhD+RDkc+CBwP2mpu4h9S+p7mY6a4=; b=VQKe91FJ25Sau1XAvBR7KZhdtK9f9lTbjlIQChoAmwaNTrG6FWGK1N6NnPyEet5YlS YSRIniuPGBiIDTUKu9DtXBxas20GmpUTX5sMcik42p41TiL1XxwnlajeI3xsMDJmFTF+ piiHxtYaiA3QDe9Lh0GaL5e+oy8RAxR3ag1c8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=beNbU8K7CLMfM/HhiEsXI4yS9fTZGrGgfC2KkvqlTTxJDnvNaNzeMBVwx/3izS/qwp Elk2C4y2M5djk4RWob9thMdQJ3lMpJBaej2Tp1NUTgYdFvyXotz/bZNkUOAB9IlS6jMR cjkmA3H2l+y+z3luGCLBGDErsgezUpZFerEPY= Received: by 10.142.215.9 with SMTP id n9mr5478312wfg.336.1278936844350; Mon, 12 Jul 2010 05:14:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.103.9 with HTTP; Mon, 12 Jul 2010 05:13:44 -0700 (PDT) In-Reply-To: <81AC78D0-074F-4475-A191-78792C28101B@trifork.com> References: <81AC78D0-074F-4475-A191-78792C28101B@trifork.com> From: Jonathan Ellis Date: Mon, 12 Jul 2010 07:13:44 -0500 Message-ID: Subject: Re: Iterate all keys - doing it as the faq fails for me :( To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org This is a bug. Can you submit a ticket with test data to reproduce? On Fri, Jul 9, 2010 at 6:40 AM, Per Olesen wrote: > Hi, > > I was reading http://wiki.apache.org/cassandra/FAQ#iter_world and decided= to implement the get_range_slices method for listing all keys of a CF. Onl= y thing is, it doesn't work that well for me :-) > > I do as it says (I think), and take KeyRanges of size N and use the key o= f the last call as start for next call. But, for small N, I keep getting th= e exact same result back from get_range_slices call, making it impossible t= o know when to stop. > > For N=3D5, the first slice of keys I get back is this: > > previousLastKey =3D > keySlice.getKey() =3D xaspays > keySlice.getKey() =3D xasfbbe > keySlice.getKey() =3D xaspaua > keySlice.getKey() =3D xasaapz > keySlice.getKey() =3D xascajz > > I then call with previousLastKey =3D xascajz and get: > > previousLastKey =3D xascajz > keySlice.getKey() =3D xascajz > keySlice.getKey() =3D xasgacr > keySlice.getKey() =3D xasfaem > keySlice.getKey() =3D xasfdco > keySlice.getKey() =3D xasfdeg > > I then call with previousLastKey =3D =A0xasfdeg and get: > > previousLastKey =3D xasfdeg > keySlice.getKey() =3D xasfdeg > keySlice.getKey() =3D xasfdad > keySlice.getKey() =3D xascaiv > keySlice.getKey() =3D xasfaqf > keySlice.getKey() =3D xasfdeg <--- ENDS IN THE SAME KEY AS PREVIOUS SLICE= ? > > ... the above 5 keys keep getting back as the exact same result :-( > > If I set N higher, like 100, I get all my (2492) rows... > > > /Per --=20 Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com