Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 70218 invoked from network); 8 Jun 2010 19:40:20 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Jun 2010 19:40:20 -0000 Received: (qmail 14265 invoked by uid 500); 8 Jun 2010 19:40:19 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 14246 invoked by uid 500); 8 Jun 2010 19:40:19 -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 14238 invoked by uid 99); 8 Jun 2010 19:40:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 19:40:19 +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 jshook@gmail.com designates 209.85.211.181 as permitted sender) Received: from [209.85.211.181] (HELO mail-yw0-f181.google.com) (209.85.211.181) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 19:40:13 +0000 Received: by ywh11 with SMTP id 11so4309981ywh.7 for ; Tue, 08 Jun 2010 12:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=pDcQaAvxm2yELfxJmi2BjgnMoRqCID/ijStmWM/9z+w=; b=xru8zYGXK5gg/bDqDPlrgE4aH9S+LEkJdn3BfSo0JV5Tj1k78+khcovbrlES9CVDyx Lk37TG2kK5KMr5dXyK1o5rhviW2eTI1lp7n/VoTS+l3gHjhjigUuUzy7DY/fAbu6agGA Ba9GwIckx8N48YoBIP73WRj0QxbAbeZTyArWA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=uXpLbSOcbTXFkQXgNfKiiPqAS0KuhWMgrCM43CXWZRdV4AzNd1cS1+GAEt8cz2Nz14 k6MuC2g83Q3ZknqlVHWPE77lkAQ/KBb7nccMhTcHIjyTRbekWuV2HsnMKRTwuV3nJKLp kNe3//RnCsKR5h4H4hCY0kuaqs4QW6y7dfDTo= MIME-Version: 1.0 Received: by 10.224.52.23 with SMTP id f23mr288345qag.57.1276025989868; Tue, 08 Jun 2010 12:39:49 -0700 (PDT) Received: by 10.229.95.132 with HTTP; Tue, 8 Jun 2010 12:39:49 -0700 (PDT) In-Reply-To: References: <87bpbl7dgi.fsf@lifelogs.com> Date: Tue, 8 Jun 2010 14:39:49 -0500 Message-ID: Subject: Re: Perl/Thrift/Cassandra strangeness From: Jonathan Shook 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 I can't divulge this particular test data, as it was borrowed from a dataset which is not public. I will see if I can reproduce the scenario, however, using other data suitable for a bug report. On Tue, Jun 8, 2010 at 2:18 PM, Jonathan Ellis wrote: > that does sound like a bug. =A0can you give us the data to insert that > allows reproducing this? > > On Tue, Jun 8, 2010 at 10:20 AM, Jonathan Shook wrote: >> Possible bug... >> >> Using a slice range with the empty sentinel values, and a count of 1 >> sometimes yields 2 ColumnOrSuperColumns, sometimes 1. >> The inconsistency had lead me to believe that the count was not >> working, hence the additional confusion. >> >> There was a particular key which returns exactly 2 >> ColumnOrSuperColumns. This happened repeatedly, even when other data >> was inserted before or after. All of the other keys were returning the >> expected 1 ColumnOrSuperColumn. >> >> Once I added a 4th super column to the key in question, it started >> behaving the same as the others, yielding exactly 1 >> ColumnOrSuperColumn. >> >> here is the code: for the predicate: >> >> =A0 =A0 =A0 =A0my $predicate =3D new Cassandra::SlicePredicate(); >> =A0 =A0 =A0 =A0my $slice_range =3D new Cassandra::SliceRange(); >> =A0 =A0 =A0 =A0$slice_range->{start} =3D ''; >> =A0 =A0 =A0 =A0$slice_range->{finish} =3D ''; >> =A0 =A0 =A0 =A0$slice_range->{reversed} =3D 1; >> =A0 =A0 =A0 =A0$slice_range->{count} =3D 1; >> =A0 =A0 =A0 =A0$predicate->{slice_range} =3D $slice_range; >> >> The columns are in the right order (reversed), so I'll get what I need >> by accessing only the first result in each slice. If I wanted to >> iterate the returned list of slices, it would manifest as a bug in my >> client. >> >> (Cassandra 6.1/Thrift/Perl) >> >> >> On Tue, Jun 8, 2010 at 11:18 AM, Jonathan Shook wrote= : >>> I was misreading the result with the original slice range. >>> I should have been expecting exactly 2 ColumnOrSuperColumns, which is >>> what I got. I was erroneously expecting only 1. >>> >>> Thanks! >>> Jonathan >>> >>> >>> 2010/6/8 Ted Zlatanov : >>>> On Mon, 7 Jun 2010 17:20:56 -0500 Jonathan Shook wr= ote: >>>> >>>> JS> The point is to get the "last" super-column. >>>> ... >>>> JS> Is the Perl Thrift client problematic, or is there something else = that >>>> JS> I am missing? >>>> >>>> Try Net::Cassandra::Easy; if it does what you want, look at the debug >>>> output or trace the code to see how the predicate is specified so you >>>> can duplicate that in your own code. >>>> >>>> In general yes, the Perl Thrift interface is problematic. =A0It's slow= and >>>> semantically inconsistent. >>>> >>>> Ted >>>> >>>> >>> >> > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of Riptano, the source for professional Cassandra support > http://riptano.com >