From cassandra-user-return-427-apmail-incubator-cassandra-user-archive=incubator.apache.org@incubator.apache.org Wed Aug 12 16:26:28 2009 Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 61623 invoked from network); 12 Aug 2009 16:26:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Aug 2009 16:26:28 -0000 Received: (qmail 28605 invoked by uid 500); 12 Aug 2009 16:26:34 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 28562 invoked by uid 500); 12 Aug 2009 16:26:34 -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 28552 invoked by uid 99); 12 Aug 2009 16:26:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2009 16:26:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 209.85.219.212 as permitted sender) Received: from [209.85.219.212] (HELO mail-ew0-f212.google.com) (209.85.219.212) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Aug 2009 16:26:25 +0000 Received: by ewy8 with SMTP id 8so139665ewy.12 for ; Wed, 12 Aug 2009 09:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=4dle36g9ww30BXtbyJb72PEz8dw6ojvJrtFpZ+AWhBs=; b=Z/P5Lcy2LsHV45kdltkET1Pc7caKv9vhosRLITXkjGR8o1J+HXcdMMWU+QjKKtytk2 Th/wVUbbPk6DHafcusfx2zcSiXhYIE80iyrVv/I6iUJPzGgqPCaUwgohbADGpGvDaSTZ aBbfv4DdtIfHKX0B4T7FVwNhDTmt3uGmqpZj4= 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=KvTMOrqhQqrUBMDNI0o7KeNXIOcCqhWNdt60C7XVgClpIt4YpMCA6RvQeOGVGt9VpI DYDvykBCTeblpxOyg3jhDL7ZTH31xlbGcZw7/S0OSeTJStkI4eSb0dMXDR+Y/QzOG4kI p3dhu+zWMEzhjh5a33KoRVUsSMvJH0zqOmanM= MIME-Version: 1.0 Received: by 10.216.90.67 with SMTP id d45mr47374wef.42.1250094365103; Wed, 12 Aug 2009 09:26:05 -0700 (PDT) In-Reply-To: <3bb1d9610908112037v17b852ev9dc0b8798969061a@mail.gmail.com> References: <3bb1d9610908112037v17b852ev9dc0b8798969061a@mail.gmail.com> Date: Wed, 12 Aug 2009 11:26:05 -0500 Message-ID: Subject: Re: New thrift api question. From: Jonathan Ellis To: cassandra-user@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org The easy way is to just show one page of results and have a Next button that uses start=3Dlast one from current page. The slightly harder way if you want to show say 10 links to the next 10 pages is, you have to select 10 pages worth of data and manually offset into that. -Jonathan On Tue, Aug 11, 2009 at 10:37 PM, Tangram Liu wrote: > Hi, there! I'm new to cassandra. and I think it fascinating. > > I got a question here: > > image a simple blog host app base on cassandra with the following data > model: > > > =A0=A0=A0 > =A0=A0=A0=A0=A0=A0=A0 > =A0=A0=A0 > =A0 > > for each new blog article, insert with blog name as the key, article titl= e > as the column name and article content as value. > > here is the question: how can i build a blog paginator with new api? > > with old api, i can simple use get_slice to get what i want(start=3Dpage > offset, count=3D row per page). but new api, however, change the start > parameter type from int to string. how can i build a paginate function wi= th > new api?