Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 5830 invoked from network); 2 Feb 2010 16:05:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 16:05:54 -0000 Received: (qmail 66787 invoked by uid 500); 2 Feb 2010 16:05:54 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 66760 invoked by uid 500); 2 Feb 2010 16:05:54 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 66748 invoked by uid 99); 2 Feb 2010 16:05:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 16:05:54 +0000 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=HTML_FONT_FACE_BAD,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebastien.pierre@gmail.com designates 209.85.222.172 as permitted sender) Received: from [209.85.222.172] (HELO mail-pz0-f172.google.com) (209.85.222.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 16:05:47 +0000 Received: by pzk2 with SMTP id 2so193916pzk.21 for ; Tue, 02 Feb 2010 08:05:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=S/NIaFFnsp1xsTjoQRwHLyXDSuhiYc8hGlopsNG6xVk=; b=sQnDFes/y/XHZWHtSoddNxO40S0qKqlTF0EKLQcTgHm+GBLu4NEsdvjzKWZKErs7Y+ +iJg/ih61lM2e6QIqKP9OuUNdStL8iqN3jHVPYKm5JFU0mt6A4LzF8qN8+6aOeMHNIal e+WH88BW1tPpI9bMkz/2U6jvpjHjf59fHUukY= 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; b=gA2KH5+hCEArOV9Hz5tpEwuL5XdWkt7IwParvHGVl3ueC/aaHwgtJPU+isS/KqHrH8 qBlVmxYgipTj/hlXU6CN9+lO1kWDWlJ1VCO24fIgFw85Srx+QeM80Ft0lNwX6F2fDlg6 qDNDcmDqRJZm06ya+Ymie7U3TNP947V0q6/4E= MIME-Version: 1.0 Received: by 10.141.108.5 with SMTP id k5mr4303470rvm.3.1265126727073; Tue, 02 Feb 2010 08:05:27 -0800 (PST) In-Reply-To: <74f4d40b1002020735i6a6db83av4976674be152f539@mail.gmail.com> References: <91790a981002020721m573edb5cqff9a4c859990a5a@mail.gmail.com> <74f4d40b1002020735i6a6db83av4976674be152f539@mail.gmail.com> From: =?ISO-8859-1?Q?S=E9bastien_Pierre?= Date: Tue, 2 Feb 2010 11:05:07 -0500 Message-ID: <91790a981002020805h3d79a37bg9ebbb932a57c0cc2@mail.gmail.com> Subject: Re: How to retrieve keys from Cassandra ? To: cassandra-user@incubator.apache.org Content-Type: multipart/alternative; boundary=000e0cd137f629bf69047ea045be --000e0cd137f629bf69047ea045be Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all, It's basically for "knowing what's inside the db", as I've been toying with Cassandra for some time, I have keys that are no longer useful and should b= e removed. I'm also storing HTTP logs in cassandra, where keys follow this convention "campaign::". So for instance, if I'd like to know what logs are available I just have to do: client.get_keys("Keyspace1", "Logs", "", "", 100, ConsistencyLevel.ONE) However, I have to use an OrderPreservingPartitioner to do so, which is (from my understanding) bad for load in this case. -- S=E9bastien 2010/2/2 Erik Holstad > Hi Sebastien! > I'm totally new to Cassandra, but as far as I know there is no way of > getting just the keys that are in the > database, they are not stored separately but only with the data itself. > > Why do you want a list of keys, what are you going to use them for? Maybe > there is another way of solving > your problem. > > What you are describing, getting all the keys/rows for a given column > sounds like you have to fetch all the > data that you have and then filter every key on your column, I don't thin= k > that get_key_range will do that for > you even, says that it takes column_family, but like I said I'm totally n= ew > > Erik > > 2010/2/2 S=E9bastien Pierre > >> Hi all, >> >> I would like to know how to retrieve the list of available keys availabl= e >> for a specific column. There is the get_key_range method, but it is only >> available when using the OrderPreservingPartitioner -- I use a >> RandomPartitioner. >> >> Does this mean that when using a RandomPartitioner, you cannot see which >> keys are available in the database ? >> >> -- S=E9bastien >> > > > > -- > Regards Erik > --000e0cd137f629bf69047ea045be Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all,

It's basically for "knowing what's = inside the db", as I've been toying with Cassandra for some time, = I have keys that are no longer useful and should be removed.

I'm also storing HTTP logs in cassandra, where keys follow t= his convention "campaign:<CAMPAIGN_ID>:<YYYYMMDD>". S= o for instance, if I'd like to know what logs are available I just have= to do:

=A0=A0 client.get_keys("Keyspace1", "Log= s", "", "", 100, ConsistencyLevel.ONE)

However, I have to use an OrderPreservingPartitioner to do s= o, which is (from my understanding) bad for load in this case.
=A0-- S=E9bastien


2010/2/2 Erik Holstad <erikholstad@gmail.com>
Hi Sebastien!
I'm totally new to Cassandra, but as far as I know the= re is no way of getting just the keys that are in the
database, they are= not stored separately but only with the data itself.

Why do you wan= t a list of keys, what are you going to use them for? Maybe there is anothe= r way of solving
your problem.

What you are describing, getting all the keys/rows for= a given column sounds like you have to fetch all the
data that you hav= e and then filter every key on your column, I don't think that get_key_= range will do that for
you even, says that it takes column_family, but like I said I'm totally= new

Erik

2010/2= /2 S=E9bastien Pierre <sebastien.pierre@gmail.com><= br>
Hi all,
=

I would like to know how to ret= rieve the list of available keys available for a specific column. There is = the get_key_range method, but it is only available when using the OrderPres= ervingPartitioner -- I use a RandomPartitioner.

Does this mean that when using a RandomPartitioner, you cannot see= which keys are available in the database ?

=A0-- S=E9bastien



--
Regards Erik

--000e0cd137f629bf69047ea045be--