tags:

views:

204

answers:

2

I'm trying to insert data into a ColumnFamily with "CompareWith" attribute "LongType". However, when trying to insert data under numerical keys, I get a thrift error.

When attempting the same operation with the cassandra-cli program, I get the error "A long is exactly 8 bytes". How can I resolve this? Should I use a different comparison type?

Thanks

+1  A: 

the cli can't insert binary data.

there are examples in test/system/test_server.py of inserting Long data in python.

jbellis
A: 

Looks like I need to use http://uk3.php.net/manual/en/function.pack.php to pack the key into an 8-byte binary string

TheDeveloper