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 = CfDef('Activity',
                       'Activity',
                       'Standard',
                       'Timestamp',
                       'BytesType')
colFam.column_metadata = ColumnDef(name='Time',
 
validation_class='LongType',
 
index_type=IndexType.KEYS,
                                               index_name='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=dataToInsert,
consistency_level=self._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.

[defa...@unknown] connect localhost/9160
Connected to: "Test Cluster" on localhost/9160
[defa...@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.jor...@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.

Reply via email to