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 Name: domain (646f6d61696e)
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Name: index_domain
          Index Type: KEYS
        Column Name: original_content_size
(6f726967696e616c5f636f6e74656e745f73697a65)
          Validation Class: org.apache.cassandra.db.marshal.LongType
          Index Name: index_content_size
          Index Type: KEYS

As suggested by thobbs in an earlier posting I am sending the
original_content_size as binary strings. I am able to write and read from
the c++ client correctly.
But on the cassandra-cli I am not able to see the values of
original_content_size as longs. following are the results seen for a value 5
that was sent.

get Page['test1234'][original_content_size];
=> (column=6f726967696e616c5f636f6e74656e745f73697a65,
value=360287970189639680, timestamp=1299773217120)

get Page['test1234'][original_content_size] as bytes;
=> (column=6f726967696e616c5f636f6e74656e745f73697a65,
value=0500000000000000, timestamp=1299773217120)

Similarly the queries do not work as expected. Example get Page where domain
= 'testabc.com' and original_content_size = 5; does not return the row that
was inserted.

Any suggestions on what I might be doing incorrectly either in schema
definition or the way I am sending the values are welcome.

-Adi

Reply via email to