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 51FE910E96 for ; Tue, 31 Dec 2013 02:12:02 +0000 (UTC) Received: (qmail 40020 invoked by uid 500); 31 Dec 2013 02:11:59 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 39994 invoked by uid 500); 31 Dec 2013 02:11:59 -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 39986 invoked by uid 99); 31 Dec 2013 02:11:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Dec 2013 02:11:59 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.128.50] (HELO mail-qe0-f50.google.com) (209.85.128.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Dec 2013 02:11:53 +0000 Received: by mail-qe0-f50.google.com with SMTP id 1so11989253qec.37 for ; Mon, 30 Dec 2013 18:11:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=5BHNPSeao6J6SIvWN7jBqY8M/5Hogfc1AGwKBzYUrAg=; b=D+2glLHFf9jM4u9vatbM4dX3A6VMPllRh0FGJIXLTpe6mgKolRA9lafx5MDsIwp+l2 vKQ7E2vQ0VGN2MJpTmQqreBC6PyZjT566WARnRZhfvltv0Av350vnbUyBE9AurfxSQpU j43DtBa/+ewj+lQGo1M4L4gC3Z8qWnpeH2ONXS6IpJ0yXzxnlp6Z86xujwFZOT78FrqN vq8Wbht/TBbx3wqcR0oj5z0OIUggnTLjMBn7jBAqwnwRRB/5rtyE69CihWEsSv3r0Pwa qttzyRDoFyOhKfdZlHRDroyx1tNJ2fAsd0rzAbdUXbteCcnj5nD0JV+ZJMpCXDCrNIsG HT6Q== X-Gm-Message-State: ALoCoQmCQpJvf3Akfs714B46BUgWrhHyNAJtqfe8dRLBOEroNMW1OjyMkc3M0w2pvWn289JH5lmF X-Received: by 10.229.53.68 with SMTP id l4mr112572096qcg.21.1388455893237; Mon, 30 Dec 2013 18:11:33 -0800 (PST) Received: from [172.16.1.18] ([203.86.207.101]) by mx.google.com with ESMTPSA id y2sm16370799qaj.13.2013.12.30.18.11.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Dec 2013 18:11:31 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: querying time series from hadoop From: Aaron Morton In-Reply-To: Date: Tue, 31 Dec 2013 15:11:22 +1300 Content-Transfer-Encoding: quoted-printable Message-Id: <7DE7BC71-01FB-4144-9298-2735D926A786@thelastpickle.com> References: To: Cassandra User X-Mailer: Apple Mail (2.1827) X-Virus-Checked: Checked by ClamAV on apache.org > So now i will try to patch my cassandra 1.2.11 installation but i just = wanted to ask you guys first, if there is any other solution that does = not involve a release. That patch in CASSANDRA-6311 is for 2.0 you cannot apply it to 1.2 > but when i am using the java driver, the driver already uses row key = for token statements and i cannot execute the query above, therefore it = does a full scan of rows. The ColumnFamilyRecordReader is designed to read lots of rows, not a = single row.=20 You should be able to use the java driver from a hadoop task though to = read a single row. Can you provide some more info on what you are doing = ?=20 Cheers ----------------- Aaron Morton New Zealand @aaronmorton Co-Founder & Principal Consultant Apache Cassandra Consulting http://www.thelastpickle.com On 26/12/2013, at 9:56 pm, mete wrote: > Hello folks,=20 >=20 > i have come up with a basic time series cql schema based on the = articles here: >=20 > http://www.datastax.com/dev/blog/advanced-time-series-with-cassandra >=20 > so simply put its something like: >=20 > rowkey, timestamp, col3, col4 etc...=20 >=20 > where rowkey and timestamp are compound keys. >=20 > Where i am having issues is to efficiently query this data structure.=20= >=20 > When i use cqlsh and query it is perfectly fine: >=20 > select * from table where rowkey=3D'row key' and date > xxx and date = <=3D yyy >=20 > but when i am using the java driver, the driver already uses row key = for token statements and i cannot execute the query above, therefore it = does a full scan of rows. >=20 > The issue that i am having is discussed here: >=20 > = http://stackoverflow.com/questions/19189649/composite-key-in-cassandra-wit= h-pig >=20 > i have gone through the relevant jira issues 6151 and 6311. This = behaviour is supposed to be fixed in 2.0.x but so far it is not there. = So now i will try to patch my cassandra 1.2.11 installation but i just = wanted to ask you guys first, if there is any other solution that does = not involve a release. >=20 > i assume that this is somewhat a common use case, the articles i = referred seems to be old enough and unless i am missing something = obvious i cannot query this schema efficiently with the current version = (1.2.x or 2.0.x) >=20 > Does anyone has a similar issue? Any pointers are welcome. >=20 > Regards > Mete >=20 >=20 >=20 >=20