From user-return-38104-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Dec 18 02:19:39 2013 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 EC27910845 for ; Wed, 18 Dec 2013 02:19:39 +0000 (UTC) Received: (qmail 48711 invoked by uid 500); 18 Dec 2013 02:19:37 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 48681 invoked by uid 500); 18 Dec 2013 02:19:37 -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 48672 invoked by uid 99); 18 Dec 2013 02:19:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2013 02:19:37 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.192.181] (HELO mail-pd0-f181.google.com) (209.85.192.181) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2013 02:19:32 +0000 Received: by mail-pd0-f181.google.com with SMTP id p10so7505812pdj.26 for ; Tue, 17 Dec 2013 18:19:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:message-id:mime-version :subject:date:references:to:in-reply-to; bh=KsYOnfPhDrHklDOqENAMJrc4kpdMnQSkj1OFlTs6hTo=; b=jfbPgj/f48FNpM75HapBDKNOy1Xsu7EnxQ/0Wwrnpu/OfFUretB4IlI5RQ46eqAlCX +ki/iGnBMOgBLJ0avxsOxcP7BEy78I9/hcAFvC/nJGVZZI7AuNBZoenPugx6wzh52cgS KALaFoeOO+bsqnIijrewlYRq3s4gYsbVxqz0w9i2yh7JUbVxHIqHLKGtDy6tyWLwdzjF q169xnYQw2a91vwNmd0bKEsMvkz/4NmhCrSQSHLVe9DI6sjfyoDh3fT1Bs2ATpUbxpZb 1wGDn3WYXVoZQb2/u5bGMikBuBnNpSx4U2JShPvBulA7WdmkO1QGtmkov5/9GL8OwYfz u8rw== X-Gm-Message-State: ALoCoQlj/+yY79V7GGg0WbSw1hsR7cnck8fiGFBFFIGBVt7UIvp+722M5jSDVqwZ7PnjMS73/Zv/ X-Received: by 10.68.129.130 with SMTP id nw2mr31569827pbb.88.1387333151791; Tue, 17 Dec 2013 18:19:11 -0800 (PST) Received: from [172.16.1.18] ([203.86.207.101]) by mx.google.com with ESMTPSA id sd3sm37075040pbb.42.2013.12.17.18.19.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 18:19:09 -0800 (PST) From: Aaron Morton Content-Type: multipart/alternative; boundary="Apple-Mail=_7FDB8DDB-0080-4009-B388-19FF7A3B3FFF" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: Cassandra pytho pagination Date: Wed, 18 Dec 2013 15:19:01 +1300 References: To: Cassandra User In-Reply-To: X-Mailer: Apple Mail (2.1822) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_7FDB8DDB-0080-4009-B388-19FF7A3B3FFF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 CQL3 and thrift do not support an offset clause, so you can only really = support next / prev page calls to the database.=20 > I am trying to use xget with column_count and buffer_size parameters. = Can someone explain me, how does it work? =46rom doc, my understanding = is that, I can do something like, What client are you using ?=20 xget is not a standard cassandra function.=20 Cheers ----------------- Aaron Morton New Zealand @aaronmorton Co-Founder & Principal Consultant Apache Cassandra Consulting http://www.thelastpickle.com On 13/12/2013, at 4:56 am, Kumar Ranjan wrote: > Hey Folks, >=20 > I need some ideas about support implementing of pagination on the = browser, from the backend. So python code (backend) gets request from = frontend with page=3D1,2,3,4 and so on and count_per_page=3D50.=20 >=20 > I am trying to use xget with column_count and buffer_size parameters. = Can someone explain me, how does it work? =46rom doc, my understanding = is that, I can do something like, >=20 >=20 > total_cols is total columns for that key. > count is what user sends me.=20 > .xget('Twitter_search', hh, column_count=3Dtotal_cols, = buffer_size=3Dcount): >=20 > Is my understanding correct? because its not working for page 2 and so = on? Please enlighten me with suggestions. >=20 > Thanks. >=20 --Apple-Mail=_7FDB8DDB-0080-4009-B388-19FF7A3B3FFF Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1 CQL3 and thrift do not support an offset clause, so you can only really support next / prev page calls to the database. 

I am trying to use xget with column_count and buffer_size parameters. Can someone explain me, how does it work? From doc, my understanding is that, I can do something like,
What client are you using ? 
xget is not a standard cassandra function. 

Cheers

-----------------
Aaron Morton
New Zealand
@aaronmorton

Co-Founder & Principal Consultant
Apache Cassandra Consulting

On 13/12/2013, at 4:56 am, Kumar Ranjan <winnerdood@gmail.com> wrote:

Hey Folks,

I need some ideas about support implementing of pagination on the browser, from the backend. So python code (backend) gets request from frontend with page=1,2,3,4 and so on and count_per_page=50. 

I am trying to use xget with column_count and buffer_size parameters. Can someone explain me, how does it work? From doc, my understanding is that, I can do something like,


total_cols is total columns for that key.
count is what user sends me. 

.xget('Twitter_search', hh, column_count=total_cols, buffer_size=count):

Is my understanding correct? because its not working for page 2 and so on? Please enlighten me with suggestions.

Thanks.


--Apple-Mail=_7FDB8DDB-0080-4009-B388-19FF7A3B3FFF--