Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 1504 invoked from network); 7 Jul 2009 13:29:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jul 2009 13:29:01 -0000 Received: (qmail 18433 invoked by uid 500); 7 Jul 2009 13:29:11 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 18420 invoked by uid 500); 7 Jul 2009 13:29:11 -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 18411 invoked by uid 99); 7 Jul 2009 13:29:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 13:29:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mrevelle@gmail.com designates 209.85.198.243 as permitted sender) Received: from [209.85.198.243] (HELO rv-out-0708.google.com) (209.85.198.243) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 13:29:00 +0000 Received: by rv-out-0708.google.com with SMTP id f25so216119rvb.0 for ; Tue, 07 Jul 2009 06:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:mime-version:subject:date:references :x-mailer; bh=CIRnt2HcjIPkP7fu6fVZFMLTTy6fLoaZfkHQZUhRA5c=; b=hAHz9Kzi/AngH2tOiuRFA5zIkJnAnFsCfPU1zUYFBv1mTcR96LqLpSPAtvq5uRQMB9 DFMouag3jsXcPhnJTq1PT2xRHEUup4NU1Vu3+3INsnyx3JrcBsknMxj6jHYeoU1/sXJk ybEuqSKRDHu+mNeiOgRj17nwDhLUKKn8DXpe8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:mime-version:subject :date:references:x-mailer; b=fDT8hj6JQEvFeBDow0vfFSPofgbPtBb59/FK7tqVO9hGlLGFS4H5Xmjp1axhSGDOUc vTqdcyW+7ICegAA+1HVvb2fNgo0LjbU0jK8rwDYtmVeWeKyfOIT0p0clf4HLNU8+yL6P 8TaYL0+QvLdiGfaz0ZnL8AmpYOnZinvYdbfqY= Received: by 10.140.163.6 with SMTP id l6mr2833739rve.40.1246973318626; Tue, 07 Jul 2009 06:28:38 -0700 (PDT) Received: from mars.caci.com (hq-users.caci.com [204.194.78.3]) by mx.google.com with ESMTPS id b39sm305158rvf.2.2009.07.07.06.28.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Jul 2009 06:28:37 -0700 (PDT) Message-Id: <3370978C-1907-4077-9169-E1DC1E32F178@gmail.com> From: Matt Revelle To: cassandra-user@incubator.apache.org In-Reply-To: Content-Type: multipart/alternative; boundary=Apple-Mail-4-230658418 Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: problems with python client Date: Tue, 7 Jul 2009 09:28:34 -0400 References: X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-4-230658418 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit The "start" and "finish" columns specify the range of columns to be retrieved. For example, start="age" and finish="height" would get you the age column but would not include the name column. I would assume "isAscending" is the order of the returned columns. On Jul 7, 2009, at 9:19 AM, Kevin Castiglione wrote: > thanks a lot for this! it works. > can you pl. explain what start, finish, isAscending are? > > > also the value i pass to offset gets passed to cassandra as limit, > is this expected? > > > >>> client.get_slice(tablename='Table1', key='1', > columnParent='Standard1', start='', finish='', isAscending=True, > offset=-1, count=1000) > [column_t(columnName='age', value='24', timestamp=1246942866), > column_t(columnName='name', value='Chris Goffinet', > timestamp=1246943353)] > > DEBUG - weakreadlocal reading SliceFromReadCommand(table='Table1', > key='1', columnFamily='Standard1', isAscending='true', limit='-1', > count='1000') > > > > On Tue, Jul 7, 2009 at 6:12 AM, Jonathan Ellis > wrote: > you want > > start='' > finish='' > offset=0 > > On Tue, Jul 7, 2009 at 8:01 AM, Kevin > Castiglione wrote: > > i have inserted a row into the table Table1 and Standard1 column > family. And > > this works with the cassandra-cli > > > > cassandra> get Table1.Standard1['1'] > > COLUMN_TIMESTAMP = 1246942866; COLUMN_VALUE = 24; COLUMN_KEY = age; > > COLUMN_TIMESTAMP = 1246943353; COLUMN_VALUE = Chris Goffinet; > COLUMN_KEY = > > name; > > Statement processed. > > > > > > but if i try to get this data using the python client I get an > empty list: > >>>> client.get_slice(tablename='Table1', key='1', > columnParent='Standard1', > >>>> start='0', finish='100', isAscending=True, offset=-1, count=1000) > > [ ] > > > > this is the output from cassandra > > DEBUG - weakreadlocal reading SliceFromReadCommand(table='Table1', > key='1', > > columnFamily='Standard1', isAscending='true', limit='-1', > count='1000') > > DEBUG - clearing > > > > > > also notice that the argument 'offset' in the python client is > actually > > passed to cassandra as 'limit'. > > > > > > is there something im missing here? > > thanks > > > --Apple-Mail-4-230658418 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable The "start" and "finish" = columns specify the range of columns to be retrieved. =  

For example, start=3D"age" and finish=3D"height"= would get you the age column but would not include the name column. =  I would assume "isAscending" is the order of the returned = columns.

On Jul 7, 2009, at 9:19 AM, Kevin Castiglione = wrote:

thanks a lot for this! it works.
can you pl. explain = what start, finish, isAscending are?


also the value i pass to = offset gets passed to cassandra as limit, is this = expected?


>>> client.get_slice(tablename=3D'Table1', = key=3D'1', columnParent=3D'Standard1', start=3D'', finish=3D'', = isAscending=3DTrue, offset=3D-1, count=3D1000)
= [column_t(columnName=3D'age', value=3D'24', timestamp=3D1246942866), = column_t(columnName=3D'name', value=3D'Chris Goffinet', = timestamp=3D1246943353)]

DEBUG - weakreadlocal reading = SliceFromReadCommand(table=3D'Table1', key=3D'1', = columnFamily=3D'Standard1', isAscending=3D'true', limit=3D'-1', = count=3D'1000')



On Tue, Jul = 7, 2009 at 6:12 AM, Jonathan Ellis <jbellis@gmail.com> = wrote:
you want

start=3D''
finish=3D''
offset=3D0
=

On Tue, Jul 7, 2009 at 8:01 AM, = Kevin
Castiglione<kevincastiglione@gmail.com&= gt; wrote:
> i have inserted a row into the table Table1 and = Standard1 column family. And
> this works with the = cassandra-cli
>
> cassandra> get = Table1.Standard1['1']
> COLUMN_TIMESTAMP =3D 1246942866; = COLUMN_VALUE =3D 24; COLUMN_KEY =3D age;
> COLUMN_TIMESTAMP =3D = 1246943353; COLUMN_VALUE =3D Chris Goffinet; COLUMN_KEY =3D
> = name;
> Statement processed.
>
>
> but if i = try to get this data using the python client I get an empty list:
= >>>> client.get_slice(tablename=3D'Table1', key=3D'1', = columnParent=3D'Standard1',
>>>> start=3D'0', = finish=3D'100', isAscending=3DTrue, offset=3D-1, count=3D1000)
> = [ ]
>
> this is the output from cassandra
> DEBUG - = weakreadlocal reading SliceFromReadCommand(table=3D'Table1', = key=3D'1',
> columnFamily=3D'Standard1', isAscending=3D'true', = limit=3D'-1', count=3D'1000')
> DEBUG - clearing
>
= >
> also notice that the argument 'offset' in the python = client is actually
> passed to cassandra as 'limit'.
>
= >
> is there something im missing here?
> thanks
= >
=


= --Apple-Mail-4-230658418--