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 555381049F for ; Thu, 12 Dec 2013 03:46:34 +0000 (UTC) Received: (qmail 11735 invoked by uid 500); 12 Dec 2013 03:46:22 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 11719 invoked by uid 500); 12 Dec 2013 03:46:21 -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 11703 invoked by uid 99); 12 Dec 2013 03:46:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2013 03:46:17 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_DBL_REDIR 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.160.51] (HELO mail-pb0-f51.google.com) (209.85.160.51) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2013 03:46:14 +0000 Received: by mail-pb0-f51.google.com with SMTP id up15so11313340pbc.10 for ; Wed, 11 Dec 2013 19:45:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=4QTZHXb8KBbpnlN+dwhnOrxpeCvEoh0bzfNQYL9Q8kI=; b=mM17KQ/nGPsCWMPgAm2OAQI6lRoeyMaoBKSNVVrBWXzHN647icfwTKPDXGFCdC4ijE 06saSOiUFLacv8STlEW1WsamxhXV6y5MX+y/i989TpsjT4QGjsdTnTvniBhC6c1aLwpR UkBxWQeWVyYiLSIBtBaqNPbrvfLhoXU1g4GxUSWDRbGjFeKr6b33hBBVN35Mk3cQj2Qk 1qGkAXE9FtYZXp7NjdfCkE6Zsmy4Xv1f1MHhkEuHV2cyahrzZNzBdNlYcePE5Hpa8Kj4 sJPdyL44DX2yiuF1rkAZbA3ugPrjj1Xwsx9QC97yxIUCvUNhaSkhqWp5K6YUZh4EvQaz JaoA== X-Gm-Message-State: ALoCoQm7IZa7/Z+QCowzRQzYuCY7cDhgk6QTpsej8PyQ86AFMu/9TFnpAKaz6nKkW/ZqboZbPcdl X-Received: by 10.68.130.39 with SMTP id ob7mr7653219pbb.63.1386819953403; Wed, 11 Dec 2013 19:45:53 -0800 (PST) Received: from [172.16.1.18] ([203.86.207.101]) by mx.google.com with ESMTPSA id nw11sm46591189pab.13.2013.12.11.19.45.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Dec 2013 19:45:52 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: From: Aaron Morton In-Reply-To: Date: Thu, 12 Dec 2013 16:45:48 +1300 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Cassandra User X-Mailer: Apple Mail (2.1822) X-Virus-Checked: Checked by ClamAV on apache.org > SYSTEM_MANAGER.create_column_family('Narrative','Twitter_search_test', = comparator_type=3D'CompositeType', default_validation_class=3D'UTF8Type', = key_validation_class=3D'UTF8Type', column_validation_classes=3Dvalidators)= =20 CompositeType is a type composed of other types, see=20 = http://pycassa.github.io/pycassa/assorted/composite_types.html?highlight=3D= compositetype Cheers ----------------- Aaron Morton New Zealand @aaronmorton Co-Founder & Principal Consultant Apache Cassandra Consulting http://www.thelastpickle.com On 12/12/2013, at 6:15 am, Kumar Ranjan wrote: > Hey Folks, >=20 > So I am creating, column family using pycassaShell. See below: >=20 > validators =3D { >=20 > 'approved': 'BooleanType', =20 >=20 > 'text': 'UTF8Type', =20 >=20 > 'favorite_count':'IntegerType', =20 >=20 > 'retweet_count': 'IntegerType', =20 >=20 > 'expanded_url': 'UTF8Type', =20 >=20 > 'tuid': 'LongType', =20 >=20 > 'screen_name': 'UTF8Type', =20 >=20 > 'profile_image': 'UTF8Type', =20 >=20 > 'embedly_data': 'CompositeType', >=20 > 'created_at': 'UTF8Type', =20 >=20 >=20 > } =20 >=20 > SYSTEM_MANAGER.create_column_family('Narrative','Twitter_search_test', = comparator_type=3D'CompositeType', default_validation_class=3D'UTF8Type', = key_validation_class=3D'UTF8Type', column_validation_classes=3Dvalidators)= =20 >=20 > I am getting this error: >=20 > InvalidRequestException: InvalidRequestException(why=3D'Invalid = definition for comparator = org.apache.cassandra.db.marshal.CompositeType.' =20 >=20 >=20 >=20 > My data will look like this: >=20 > 'row_key' : { 'tid' : >=20 > { >=20 > 'expanded_url': u'http://instagram.com/p/hwDj2BJeBy/', >=20 > 'text': '#snowinginNYC!!!! Makes me so = happy\xe2\x9d\x840brittles0 \xe2\x9b\x84 @ Grumman Studios = http://t.co/rlOvaYSfKa', >=20 > 'profile_image': = u'https://pbs.twimg.com/profile_images/3262070059/1e82f895559b904945d28cd3= ab3947e5_normal.jpeg', >=20 > 'tuid': 339322611, >=20 > 'approved': 'true', >=20 > 'favorite_count': 0, >=20 > 'screen_name': u'LonaVigi', >=20 > 'created_at': u'Wed Dec 11 01:10:05 +0000 2013', >=20 > 'embedly_data': {u'provider_url': u'http://instagram.com/', = u'description': u"lonavigi's photo on Instagram", u'title': = u'#snwinginNYC!!!! Makes me so happy\u2744@0brittles0 \u26c4', u'url': = u'http://distilleryimage7.ak.instagram.com/5b880dec61c711e3a50b129314edd3b= _8.jpg', u'thumbnail_width': 640, u'height': 640, u'width': 640, = u'thumbnail_url': = u'http://distilleryimage7.ak.instagram.com/b880dec61c711e3a50b1293d14edd3b= _8.jpg', u'author_name': u'lonavigi', u'version': u'1.0', = u'provider_name': u'Instagram', u'type': u'poto', u'thumbnail_height': = 640, u'author_url': u'http://instagram.com/lonavigi'}, >=20 > 'tid': 410577192746500096, >=20 > 'retweet_count': 0 >=20 > } =20 >=20 > } >=20