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 61DB67456 for ; Thu, 22 Sep 2011 08:51:24 +0000 (UTC) Received: (qmail 68915 invoked by uid 500); 22 Sep 2011 08:51:22 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 68896 invoked by uid 500); 22 Sep 2011 08:51:22 -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 68887 invoked by uid 99); 22 Sep 2011 08:51:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2011 08:51:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yulinyen@gmail.com designates 209.85.215.50 as permitted sender) Received: from [209.85.215.50] (HELO mail-ew0-f50.google.com) (209.85.215.50) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2011 08:51:15 +0000 Received: by ewy22 with SMTP id 22so2333902ewy.37 for ; Thu, 22 Sep 2011 01:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+apYn7w5lFlnnIicHqD8bI83AvMhrmkNjkiz8Jp4WGE=; b=ddYkbc89bQH6uOHG9uGW/FCMu36rY7t1Ir107pkf2DzcCTqVyE+JN6ELvCzcmMhvfe G4gBjc2omSu6f2I2ROh/lOLLsZGMEcrS96RXRIxSppufQBfx7dVh7x/Y0KSV83opsvT2 xxNQPEYnnvpZRJCpEtxBbmvPQHbva3hs0XWe0= MIME-Version: 1.0 Received: by 10.213.28.78 with SMTP id l14mr1187728ebc.19.1316681455645; Thu, 22 Sep 2011 01:50:55 -0700 (PDT) Received: by 10.213.13.139 with HTTP; Thu, 22 Sep 2011 01:50:55 -0700 (PDT) In-Reply-To: References: <6F8B8E61-100B-4B1C-8748-8E00B0A99DA0@thelastpickle.com> Date: Thu, 22 Sep 2011 16:50:55 +0800 Message-ID: Subject: Re: Possibility of going OOM using get_count From: Boris Yen To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0015174c186872338b04ad83ca3e X-Virus-Checked: Checked by ClamAV on apache.org --0015174c186872338b04ad83ca3e Content-Type: text/plain; charset=ISO-8859-1 I was wondering if it is possible to use similar way as CASSANDRA-2894 to have the slice_predict support the offset concept? With the offset, it would be much easier to implement the paging from the client side. Boris On Mon, Sep 19, 2011 at 9:45 PM, Jonathan Ellis wrote: > Unfortunately no, because you don't know what the actual > last-column-counted was. > > On Mon, Sep 19, 2011 at 4:25 AM, aaron morton > wrote: > > get_count() supports the same predicate as get_slice. So you can > implement > > the paging yourself. > > Cheers > > ----------------- > > Aaron Morton > > Freelance Cassandra Developer > > @aaronmorton > > http://www.thelastpickle.com > > On 19/09/2011, at 8:45 PM, Tharindu Mathew wrote: > > > > > > On Mon, Sep 19, 2011 at 12:40 PM, Benoit Perroud > wrote: > >> > >> The workaround for 0.7 is calling get_slice and count on client side. > >> It's heavier, sure, but you will then be able to set start column > >> accordingly. > > > > I was afraid of that :( > > Will follow that method. Thanks. > >> > >> > >> 2011/9/19 Tharindu Mathew : > >> > Thanks Aaron and Jake for the replies. > >> > Any chance of a possible workaround to use for Cassandra 0.7? > >> > > >> > On Mon, Sep 19, 2011 at 3:48 AM, aaron morton < > aaron@thelastpickle.com> > >> > wrote: > >> >> > >> >> Cool > >> >> Thanks, A > >> >> ----------------- > >> >> Aaron Morton > >> >> Freelance Cassandra Developer > >> >> @aaronmorton > >> >> http://www.thelastpickle.com > >> >> On 19/09/2011, at 9:55 AM, Jake Luciani wrote: > >> >> > >> >> This is fixed in 1.0 > >> >> https://issues.apache.org/jira/browse/CASSANDRA-2894 > >> >> > >> >> On Sun, Sep 18, 2011 at 2:16 PM, Tharindu Mathew < > mccloud35@gmail.com> > >> >> wrote: > >> >>> > >> >>> Hi everyone, > >> >>> I noticed this line in the API docs, > >> >>> > >> >>> The method is not O(1). It takes all the columns from disk to > >> >>> calculate > >> >>> the answer. The only benefit of the method is that you do not need > to > >> >>> pull > >> >>> all the columns over Thrift interface to count them. > >> >>> > >> >>> Does this mean if a row has a large number of columns calling this > >> >>> method > >> >>> might make it go OOM? > >> >>> Thanks in advance. > >> >>> -- > >> >>> Regards, > >> >>> > >> >>> Tharindu > >> >>> blog: http://mackiemathew.com/ > >> >> > >> >> > >> >> > >> >> -- > >> >> http://twitter.com/tjake > >> >> > >> > > >> > > >> > > >> > -- > >> > Regards, > >> > > >> > Tharindu > >> > blog: http://mackiemathew.com/ > >> > > > > > > > > > -- > > Regards, > > > > Tharindu > > blog: http://mackiemathew.com/ > > > > > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of DataStax, the source for professional Cassandra support > http://www.datastax.com > --0015174c186872338b04ad83ca3e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I was wondering if it is possible to use similar way as=A0CASSA= NDRA-2894=A0to have the slice_predict support the offset concept= ? With the offset, it would be much easier to implement the paging from the= client side.

Boris

On Mon, Sep 19, 2011= at 9:45 PM, Jonathan Ellis <jbellis@gmail.com> wrote:
Unfortunately no, because you don't know what the actual
last-column-counted was.

On Mon, Sep 19, 2011 at 4:25 AM, aaron morton <aaron@thelastpickle.com> wrote:
> get_count() supports the same predicate as get_slice. So you can imple= ment
> the paging yourself.
> Cheers
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> @aaronmorton
> http://www.= thelastpickle.com
> On 19/09/2011, at 8:45 PM, Tharindu Mathew wrote:
>
>
> On Mon, Sep 19, 2011 at 12:40 PM, Benoit Perroud <benoit@noisette.ch> wrote:
>>
>> The workaround for 0.7 is calling get_slice and count on client si= de.
>> It's heavier, sure, but you will then be able to set start col= umn
>> accordingly.
>
> I was afraid of that :(
> Will follow that method. Thanks.
>>
>>
>> 2011/9/19 Tharindu Mathew <mccloud35@gmail.com>:
>> > Thanks Aaron and Jake for the replies.
>> > Any chance of a possible workaround to use for Cassandra 0.7?=
>> >
>> > On Mon, Sep 19, 2011 at 3:48 AM, aaron morton <aaron@thelastpickle.com>
>> > wrote:
>> >>
>> >> Cool
>> >> Thanks,=A0A
>> >> -----------------
>> >> Aaron Morton
>> >> Freelance Cassandra Developer
>> >> @aaronmorton
>> >> http://www.thelastpickle.com
>> >> On 19/09/2011, at 9:55 AM, Jake Luciani wrote:
>> >>
>> >> This is fixed in 1.0
>> >> https://issues.apache.org/jira/browse/CASSANDRA-2= 894
>> >>
>> >> On Sun, Sep 18, 2011 at 2:16 PM, Tharindu Mathew <mccloud35@gmail.com>
>> >> wrote:
>> >>>
>> >>> Hi everyone,
>> >>> I noticed this line in the API docs,
>> >>>
>> >>> The method is not O(1). It takes all the columns from= disk to
>> >>> calculate
>> >>> the answer. The only benefit of the method is that yo= u do not need to
>> >>> pull
>> >>> all the columns over Thrift interface to count them.<= br> >> >>>
>> >>> Does this mean if a row has a large number of columns= calling this
>> >>> method
>> >>> might make it go OOM?
>> >>> Thanks in advance.
>> >>> --
>> >>> Regards,
>> >>>
>> >>> Tharindu
>> >>> blog:=A0http://mackiemathew.com/
>> >>
>> >>
>> >>
>> >> --
>> >> ht= tp://twitter.com/tjake
>> >>
>> >
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Tharindu
>> > blog:=A0http://mackiemathew.com/
>> >
>
>
>
> --
> Regards,
>
> Tharindu
> blog:=A0http://= mackiemathew.com/
>
>



--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.c= om

--0015174c186872338b04ad83ca3e--