Return-Path: Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: (qmail 81208 invoked from network); 27 Aug 2010 15:13:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Aug 2010 15:13:58 -0000 Received: (qmail 5362 invoked by uid 500); 27 Aug 2010 15:13:57 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 5285 invoked by uid 500); 27 Aug 2010 15:13:56 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 5277 invoked by uid 99); 27 Aug 2010 15:13:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Aug 2010 15:13:56 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of JEREMIAH.JORDAN@morningstar.com designates 216.228.224.32 as permitted sender) Received: from [216.228.224.32] (HELO mx85.morningstar.com) (216.228.224.32) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 27 Aug 2010 15:13:51 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CB45FA.6855809B" Subject: Trying to use the new column index feature Date: Fri, 27 Aug 2010 10:13:30 -0500 Message-ID: <05CEA178DD88EE4FA89EED77C245F84907489992@msex85.morningstar.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Trying to use the new column index feature Thread-Index: ActF+miBtrIEkV3eRH2JgGvzGhfTyg== From: "Jeremiah Jordan" To: ------_=_NextPart_001_01CB45FA.6855809B Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am trying to use the new column index feature. I am using the nightly from: apache-cassandra-2010-08-23_13-57-40-bin.tar.gz. I created a column family: colFam =3D CfDef('Activity', 'Activity', 'Standard', 'Timestamp', 'BytesType') colFam.column_metadata =3D ColumnDef(name=3D'Time', =20 validation_class=3D'LongType', =20 index_type=3DIndexType.KEYS, = index_name=3D'TIME_INDEX') self._client.system_add_column_family(colFam) When I try to use batch_mutate to insert data I get: Traceback (most recent call last): File "C:\GitStuff\olympus_beta\Python\Olympus\Common\DataHelper.py", line 404, in InsertData self._client.batch_mutate(mutation_map=3DdataToInsert, consistency_level=3Dself._DATA_CONSISTENCY_WRITE) File "C:\GitStuff\olympus_beta\Python\Olympus\Common\cassandra\Cassandra.py", line 786, in batch_mutate self.recv_batch_mutate() File "C:\GitStuff\olympus_beta\Python\Olympus\Common\cassandra\Cassandra.py", line 803, in recv_batch_mutate raise x TApplicationException: Required field 'cf_def' was not present! Struct: system_add_column_family_args(cf_def:null) The system.log has this in it: 10/08/27 10:09:05 ERROR thrift.CustomTThreadPoolServer: Thrift error occurred during processing of message. org.apache.thrift.protocol.TProtocolException: Missing version in readMessageBegin, old client? at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProto col.java:211) at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2 487) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(Cu stomTThreadPoolServer.java:167) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto r.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja va:908) at java.lang.Thread.run(Thread.java:619) My code and the server are both using API version 11.1.0, so that wasn't the problem. [default@unknown] connect localhost/9160 Connected to: "Test Cluster" on localhost/9160 [default@unknown] show api version 11.1.0 >>> import cassandra.constants >>> print cassandra.constants.VERSION 11.1.0 >>> Am I doing something wrong or is this a bug? I looked at the code in test_thrift_server.py, but it uses insert not batch_mutate to put data into the indexed column. ________________________________ Jeremiah Jordan Application Developer Morningstar, Inc. Morningstar. Illuminating investing worldwide. +1 312 696-6128 voice jeremiah.jordan@morningstar.com www.morningstar.com This e-mail contains privileged and confidential information and is intended only for the use of the person(s) named above. Any dissemination, distribution, or duplication of this communication without prior written consent from Morningstar is strictly prohibited. If you have received this message in error, please contact the sender immediately and delete the materials from any computer. ------_=_NextPart_001_01CB45FA.6855809B--