Re: Cassandra LongType data insertion problem for secondary index usage

2011-03-10 Thread buddhasystem
speed. Thanks, Maxim -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Cassandra-LongType-data-insertion-problem-for-secondary-index-usage-tp6158486p6159840.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at Nabble.com.

Re: Cassandra LongType data insertion problem for secondary index usage

2011-03-10 Thread Adi
That was it. Thanks thobbs :-) The queries work as expected now. -Adi On Thu, Mar 10, 2011 at 1:01 PM, Tyler Hobbs wrote: > I looked again at the original > email

Re: Cassandra LongType data insertion problem for secondary index usage

2011-03-10 Thread Tyler Hobbs
I looked again at the original emailand noticed that besides the bit-shift issue that gets corrected in the next email in the thread, there is another probl

Cassandra LongType data insertion problem for secondary index usage

2011-03-10 Thread Adi
Environment: Cassandra 0.7.0 , C++ Thrift client on windows I have a column family with a secondary index ColumnFamily: Page Columns sorted by: org.apache.cassandra.db.marshal.BytesType Built indexes: [Page.index_domain, Page.index_content_size] Column Metadata: Column N

Re: Cassandra LongType data insertion problem

2011-01-04 Thread Tyler Hobbs
Oops, I made one typo there. It should be: "my_long = my_long >> 8;" That is, shift by a byte, not a bit. - Tyler On Tue, Jan 4, 2011 at 10:50 PM, Tyler Hobbs wrote: > Here's an example: > > int64_t my_long = 12345678; > char chars[8]; > for(int i = 0; i < 8; ++i) { > chars[i] = my_long & 0xff

Re: Cassandra LongType data insertion problem

2011-01-04 Thread Tyler Hobbs
Here's an example: int64_t my_long = 12345678; char chars[8]; for(int i = 0; i < 8; ++i) { chars[i] = my_long & 0xff; my_long = my_long >> 1; } std::string str_long(chars, 8); Column c1; c1.name = str_long; // etc ... Basically, Thrift expects a string which is a big-endian binary representatio

Cassandra LongType data insertion problem

2011-01-04 Thread Jaydeep Chovatia
Hi, I have configured Cassandra Column Family (standard CF) of LongType. If I try to insert data (using batch_mutate) in this Column Family then it shows me following error: "A long is exactly 8 bytes". I have tried assigning column name of 8 bytes, 7 bytes, etc. but it shows same error. Pleas