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 C87A199FB for ; Thu, 27 Oct 2011 18:23:08 +0000 (UTC) Received: (qmail 86263 invoked by uid 500); 27 Oct 2011 18:23:06 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 86238 invoked by uid 500); 27 Oct 2011 18:23:06 -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 86230 invoked by uid 99); 27 Oct 2011 18:23:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 18:23:06 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of caleb@steelhouse.com does not designate 66.46.182.53 as permitted sender) Received: from [66.46.182.53] (HELO relay.ihostexchange.net) (66.46.182.53) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 18:23:01 +0000 Received: from VMBX131.ihostexchange.net ([192.168.40.21]) by HUB103.ihostexchange.net ([66.46.182.53]) with mapi; Thu, 27 Oct 2011 14:22:40 -0400 From: Caleb Rackliffe To: "user@cassandra.apache.org" Date: Thu, 27 Oct 2011 14:22:39 -0400 Subject: Re: super sub slice query? Thread-Topic: super sub slice query? Thread-Index: AcyU1Wn9PmStoiR+SUCIwq5Rfoke5g== Message-ID: In-Reply-To: <4EA933A0.8030001@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.13.0.110805 acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_CACEEF6E4192calebsteelhousecom_" MIME-Version: 1.0 --_000_CACEEF6E4192calebsteelhousecom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I had the same question you did, I think. Below is as far as I got with He= ctor=85 I have a column family of super-columns with long names. The columns in ea= ch super-column also have long names. I'm using Hector, and what I want to= do is get the last column in each super-column, for a range of super-colum= ns. I was able to get the last column in a column family like this=85 Cluster cluster =3D HFactory.getOrCreateCluster("Cortex", config); Keyspace keyspace =3D HFactory.createKeyspace("Products", cluster); RangeSlicesQuery rangeSlicesQuery =3D HFactory.createRangeSlicesQuery(keyspace, StringSerializer.get(), StringSer= ializer.get(), StringSerializer.get()); rangeSlicesQuery.setColumnFamily("Attributes"); rangeSlicesQuery.setKeys("id0", "id0"); rangeSlicesQuery.setRange("", "", true, 1); QueryResult> rsult =3D rangeSlicesQuery= .execute(); =85but no luck with the additional dimension. Caleb Rackliffe | Software Developer M 949.981.0159 | caleb@steelhouse.com From: Guy Incognito > Reply-To: "user@cassandra.apache.org" > Date: Thu, 27 Oct 2011 06:34:08 -0400 To: "user@cassandra.apache.org" > Subject: super sub slice query? is there such a thing? a query that runs against a SC family and returns a= subset of subcolumns from a set of super-columns? is there a way to have eg a slice query (or super slice query) only return = the column names, rather than the value as well? --_000_CACEEF6E4192calebsteelhousecom_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
I had = the same question you did, I think.  Below is as far as I got with Hec= tor=85

I have a column family of super= -columns with long names.  The columns in each super-column also have = long names.  I'm using Hector, and what I want to do is get the last c= olumn in each super-column, for a range of super-columns.  I was able = to get the last column in a column family  like this=85

=

Clus= ter cluster =3D HFactory.getOrCreateCluster("Cortex", config);

Keyspace keyspace =3D HFactory.createKey= space("Products"= , cluster);

RangeSlicesQuery<String, String, String> rangeSlicesQuery =3D <= /p>

HFactory.createRan= geSlicesQuery(keyspace, StringSerializer.get(), StringSerializer.get(), Str= ingSerializer.get());

rangeSlicesQuery.setColumnFamily("Attributes");

rangeSlicesQuery.setKeys("id0""id0");

rangeSlicesQuery.setRange(""""true, 1);


Qu= eryResult<OrderedRows<String, String, String>> rsult =3D rangeS= licesQuery.execute();


Caleb Rackliffe | Software Developer

M 949.981.0159 | caleb@steelhouse.com

From: G= uy Incognito <dnd1066@gmail.com= >
Reply-To: "user@cassandra.apache.org" <= user@cassandra.apache.org&= gt;
Date: Thu, 27 Oct 2011 06:3= 4:08 -0400
To: "user@cassandra.apache.org" <= user@cassandra.apache.org&= gt;
Subject: super sub slice qu= ery?

=20 =20 =20
is there such a thing?  a q= uery that runs against a SC family and returns a subset of subcolumns from a set of super-columns?

is there a way to have eg a slice query (or super slice query) only return the column names, rather than the value as well?
--_000_CACEEF6E4192calebsteelhousecom_--