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 31871102CC for ; Thu, 15 Aug 2013 16:31:13 +0000 (UTC) Received: (qmail 76492 invoked by uid 500); 15 Aug 2013 16:31:09 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 76303 invoked by uid 500); 15 Aug 2013 16:31:09 -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 76294 invoked by uid 99); 15 Aug 2013 16:31:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 16:31:08 +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 tyler@datastax.com designates 209.85.215.52 as permitted sender) Received: from [209.85.215.52] (HELO mail-la0-f52.google.com) (209.85.215.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 16:31:02 +0000 Received: by mail-la0-f52.google.com with SMTP id ev20so694546lab.25 for ; Thu, 15 Aug 2013 09:30:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=YuAJukg7svs6Gd+NyRmyhh/q3XNN8znGA2bbs4bK314=; b=QL2FjbUfJLWOSmdSXv0Ml5kZyvlTKdmff9W9SPvhzgTfCSQYEOE+3QTqDHlBWjg72O X9K12M+ogTDlpteiUcJ5ZG6IzOSxF447mIs3aD3twZH9tRSu4HH0Sgw5S4f2LV74ivwj lTIW67nD9/mXfKQ8dOrOPR1bkdE3XmWNt5NFQLSeVoFzxzwLLmXVpINurrNmR7mNmk2p pRUYDMJfv72239zk6dt5LEm9tvAqBQkfhdA6Fvmt1db14Pl7iw2ZuRs0ItnxIaNdF5AR d7HGi775H2zo6WWqZ+Xe5VUtFbW6cSONs3rP5cpgqHzN8d0lMzV/QYGTdkQ/d3Wi5Coi J6Mg== X-Gm-Message-State: ALoCoQkMZhc8bWM83b/+Y5O/Q5R7n5khi//reKkJp6FvCKnv96brfI9vzD+j3F3Yh3DJ4eCsUh5Q X-Received: by 10.112.33.231 with SMTP id u7mr94747lbi.49.1376584241093; Thu, 15 Aug 2013 09:30:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.157.35 with HTTP; Thu, 15 Aug 2013 09:30:20 -0700 (PDT) In-Reply-To: References: From: Tyler Hobbs Date: Thu, 15 Aug 2013 11:30:20 -0500 Message-ID: Subject: Re: How to create counter column family via Pycassa? To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=14dae947376bb1a83104e3fefe46 X-Virus-Checked: Checked by ClamAV on apache.org --14dae947376bb1a83104e3fefe46 Content-Type: text/plain; charset=ISO-8859-1 The column_validation_classes arg is just for defining individual column types. Glad you got it figured out, though. On Thu, Aug 15, 2013 at 11:23 AM, Pinak Pani < nishant.has.a.question@gmail.com> wrote: > Thanks for quick reply. Apparantly, I was trying this to get working > > cf_kwargs = {'default_validation_class':COUNTER_COLUMN_TYPE} > sys.create_column_family('my_ks', 'vote_count', > column_validation_classes=cf_kwargs) #1 > > But this works: > > sys.create_column_family('my_ks', 'vote_count', **cf_kwargs) #2 > > I thought #1 should work. > > > > On Thu, Aug 15, 2013 at 9:15 PM, Tyler Hobbs wrote: > >> The only thing that makes a CF a counter CF is that the default >> validation class is CounterColumnType, which you can set through >> SystemManager.create_column_family(). >> >> >> On Thu, Aug 15, 2013 at 10:38 AM, Pinak Pani < >> nishant.has.a.question@gmail.com> wrote: >> >>> I do not find a way to create a counter column family in Pycassa. >>> This[1] does not help. >>> >>> Appreciate if someone can help me. >>> >>> Thanks >>> >>> 1. >>> http://pycassa.github.io/pycassa/api/pycassa/system_manager.html#pycassa.system_manager.SystemManager.create_column_family >>> >> >> >> >> -- >> Tyler Hobbs >> DataStax >> > > -- Tyler Hobbs DataStax --14dae947376bb1a83104e3fefe46 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The column_validation_classes arg is just for defining ind= ividual column types.=A0 Glad you got it figured out, though.


On Thu, Aug 15, 2= 013 at 11:23 AM, Pinak Pani <nishant.has.a.question@gmail.c= om> wrote:
Thanks for quick reply. App= arantly, I was trying this to get working

cf_kwargs =3D {'d= efault_validation_class':COUNTER_COLUMN_TYPE}
sys.create_column_family('my_ks', 'vote_count', column= _validation_classes=3Dcf_kwargs) =A0#1

But this works:

sys.create_col= umn_family('my_ks', 'vote_count', **cf_kwargs) =A0#2

I thought #1 should work.



On Thu, Aug 1= 5, 2013 at 9:15 PM, Tyler Hobbs <tyler@datastax.com> wrote:=
The only thing that makes a CF a counter CF is that the de= fault validation class is CounterColumnType, which you can set through Syst= emManager.create_column_family().


On Thu, Aug 15, 2013 at 10:38 AM, Pinak Pani <nishant.has.a.question@gmail.com> wrote:
I do not find a way to create a counter column family in P= ycassa.
This[1] does not help.

Appreciate if s= omeone can help me.

Thanks




--
Tyler Hobbs
DataStax




--
Tyler Hobbs
DataStax
--14dae947376bb1a83104e3fefe46--