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 A548691A5 for ; Tue, 27 Mar 2012 14:35:36 +0000 (UTC) Received: (qmail 97168 invoked by uid 500); 27 Mar 2012 14:35:34 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 97141 invoked by uid 500); 27 Mar 2012 14:35:34 -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 97133 invoked by uid 99); 27 Mar 2012 14:35:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 14:35:34 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of puneetloya@gmail.com designates 209.85.212.178 as permitted sender) Received: from [209.85.212.178] (HELO mail-wi0-f178.google.com) (209.85.212.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 14:35:28 +0000 Received: by wibhq7 with SMTP id hq7so4397720wib.7 for ; Tue, 27 Mar 2012 07:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=vtelmlYf7v/oL2wvFZC07liS5wiy7g+mFTohgme267Y=; b=lHQqcVpzRzJTB7UydvIXvfBYCBDdzY19Mn1CyggYvY+cDxtaPvSmEzT9lR6FN97CH1 WmHKfCBdgRq4aAisKnObEgpYafe5+RKLBEwyWJkG0QN4wOqN18JFG/PNw4kaqJRA6LeS kuovNFSMk6aVYH/a43mH2fcCwC4/YTBtuPqCs9+x0oGH3ssQjJ3FPCb69CoGsGnMy2QC UblDWlro5iIDdG7sFFA/osmWrNo6Bg94SFkGWy/0WkBQWLl21SNP2/C+znyAQ5hM9sVE tUBY007j0Ji8bVB6Lch8rTjqDkzFJkoB/aviaMf/cAkYP1ObKv/MckPohgIVec/2jhPD sAzA== MIME-Version: 1.0 Received: by 10.180.88.169 with SMTP id bh9mr28464610wib.5.1332858907792; Tue, 27 Mar 2012 07:35:07 -0700 (PDT) Received: by 10.223.156.193 with HTTP; Tue, 27 Mar 2012 07:35:07 -0700 (PDT) In-Reply-To: <4F71C8FE.1080805@mebigfatguy.com> References: <4F71C8FE.1080805@mebigfatguy.com> Date: Tue, 27 Mar 2012 20:05:07 +0530 Message-ID: Subject: Re: counter column family From: puneet loya To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d04182570bc14e404bc3a65f5 --f46d04182570bc14e404bc3a65f5 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable now i want to have a field incrementing with every row insertion. how do i do it in cassandra?? On Tue, Mar 27, 2012 at 7:34 PM, Dave Brosius wro= te: > Counter columns are special, they must be in a column family to > themselves. > > On 03/27/2012 09:32 AM, puneet loya wrote: > > wen i m using a counter column.. i m nt able to add columns of other type > to the column family.. is it so or it is just synactical error?? > > [default@CMDCv99] create column family status > ... with comparator =3D AsciiType > ... and column_metadata =3D > ... [{ > ... column_name : Test, > ... validation_class : IntegerType, > ... index_type : 0, > ... index_name : IdxName}, > ... { > ... column_name : 'other name', > ... validation_class : CounterColumnType > ... }]; > Cannot add a counter column (other name) in a non counter column family > > On Tue, Mar 27, 2012 at 6:55 PM, R. Verlangen wrote: > >> You should use a connection pool without retries to prevent a "single" >> increment of +1 have a result of e.g. +3. >> >> >> 2012/3/27 Rishabh Agrawal >> >>> You can even define how much increment you want. But let me just warn >>> you, as far my knowledge, it has consistency issues. >>> >>> >>> >>> *From:* puneet loya [mailto:puneetloya@gmail.com] >>> *Sent:* Tuesday, March 27, 2012 5:59 PM >>> >>> *To:* user@cassandra.apache.org >>> *Subject:* Re: counter column family >>> >>> >>> >>> thanxx a ton :) :) >>> >>> >>> >>> the counter column family works synonymous as 'auto increment' in other >>> databases rite? >>> >>> >>> >>> I mean we have a column of type integer which increments with every >>> insert. >>> >>> >>> >>> Am i goin the rite way?? >>> >>> >>> >>> please reply :) >>> >>> On Tue, Mar 27, 2012 at 5:50 PM, R. Verlangen wrote: >>> >>> *create column family MyCounterColumnFamily with >>> default_validation_class=3DCounterColumnType and >>> key_validation_class=3DUTF8Type and comparator=3DUTF8Type;* >>> >>> >>> >>> There you go! Keys must be utf8, as well as the column names. Of course >>> you can change those validators. >>> >>> >>> >>> Cheers! >>> >>> >>> >>> 2012/3/27 puneet loya >>> >>> Can u give an example of create column family with counter column in it= . >>> >>> >>> >>> >>> >>> Please reply >>> >>> >>> >>> >>> >>> Regards, >>> >>> >>> >>> Puneet Loya >>> >>> >>> >>> >>> >>> -- >>> With kind regards, >>> >>> >>> >>> Robin Verlangen >>> >>> www.robinverlangen.nl >>> >>> >>> >>> >>> >>> ------------------------------ >>> >>> Impetus to sponsor and exhibit at Structure Data 2012, NY; Mar 21-22. >>> Know more about our Big Data quick-start program at the event. >>> >>> New Impetus webcast =91Cloud-enabled Performance Testing vis-=E0-vis >>> On-premise=92 available at http://bit.ly/z6zT4L. >>> >>> >>> NOTE: This message may contain information that is confidential, >>> proprietary, privileged or otherwise protected by law. The message is >>> intended solely for the named addressee. If received in error, please >>> destroy and notify the sender. Any use of this email is prohibited when >>> received in error. Impetus does not represent, warrant and/or guarantee= , >>> that the integrity of this communication has been maintained nor that t= he >>> communication is free of errors, virus, interception or interference. >>> >> >> >> >> -- >> With kind regards, >> >> Robin Verlangen >> www.robinverlangen.nl >> >> > > --f46d04182570bc14e404bc3a65f5 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable now i want to have a field incrementing with every row insertion. how do i = do it in cassandra??=A0

On Tue, Mar 27, 2= 012 at 7:34 PM, Dave Brosius <dbrosius@mebigfatguy.com> wrote:
=20 =20 =20
Counter columns are special, they must be in a column family to themselves.

On 03/27/2012 09:32 AM, puneet loya wrote:
wen i m using a counter column.. i m nt able = to add columns of other type to the column family.. is it so or it is just synactical error??

[default@CMDCv99] create column family status
... =A0 =A0 =A0 =A0 with comparator =3D AsciiType
... =A0 =A0 =A0 =A0 and column_metadata =3D
... =A0 =A0 =A0 =A0 [{
... =A0 =A0 =A0 =A0 =A0 =A0 column_name : Test,
... =A0 =A0 =A0 =A0 =A0 =A0 validation_class : IntegerType,
... =A0 =A0 =A0 =A0 =A0 =A0 index_type : 0,
... =A0 =A0 =A0 =A0 =A0 =A0 index_name : IdxName},
... =A0 =A0 =A0 =A0 {
... =A0 =A0 =A0 =A0 =A0 =A0 column_name : 'other name'= ,
... =A0 =A0 =A0 =A0 =A0 =A0 validation_class : CounterColumnTy= pe
... =A0 =A0 =A0 =A0 }];
Cannot add a counter column (other name) in a non counter column family

On Tue, Mar 27, 2012 at 6:55 PM, R. Verlangen <robin@us2.nl> wrote:
You should use a connection pool without retries to prevent a "single" increment of +1 have a result of e.g. +3.


2012/3/27 Rishabh Agrawal <rishabh.agrawal@impetus.co.in>

Y= ou can even define how much increment you want. But let me just warn you, as far my knowledge, it has consistency issues.

= =A0

From:<= /b> puneet loya [mailto:puneetloya@gmail.com]
Sent: Tuesday, March 27, 2012 5:59 PM


To: user@cassandra.apache.org
Subject: Re: counter column family

=A0

thanxx a ton :) :)

=A0

the counter column family works synonymous as 'auto increment' in other databases rite?

=A0

I mean we have a column of =A0type integer which increments with every insert.

=A0

Am i goin the rite way??

=A0

please reply :)

On Tue, Mar 27, 2012 at 5:50 PM, R. Verlangen <robin@us2.nl> wrote:

create column family MyCounterColumnFamily with default_validation_class=3DCounterCol= umnType and key_validation_class=3DUTF8Type and comparator=3DUTF8Type;= =A0

=A0

There you go! Keys must be utf8, as well as the column names. Of course you can change those validators.

=A0

Cheers!

=A0

2012/3/27 puneet loya <puneetloya@gmail.com>

Can u give an example of create column family with counter column in it.=A0

=A0

=A0

Please reply

=A0

=A0

Regards,

=A0

Puneet Loya



=A0

--
With kind regards,

=A0

Robin Verlangen

=A0

=A0



Impetus to sponsor and exhibit at Structure Data 2012, NY; Mar 21-22. Know more about our Big Data quick-start program at the event.

New Impetus webcast =91Cloud-enabled Performance Testing vis-=E0-vis On-premise=92 available at http://bit.ly/z6zT4L.


NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.



--
With kind regards,

Robin Verlangen




--f46d04182570bc14e404bc3a65f5--