Re: Unable to reliably count keys on a thrift CF

2016-04-25 Thread Anuj Wadehra
Hi Carlos, Please check if the JIRA :  https://issues.apache.org/jira/browse/CASSANDRA-11467 fixes your problem. We had been facing row count issue with thrift cf / compact storage and this fixed it. Above is fixed in latest 2.1.14. Its a two line fix. So, you can also prepare a custom jar and ch

Re: Unable to reliably count keys on a thrift CF

2016-04-25 Thread Carlos Alonso
Hi Jens. Thanks for your response but my idea is to count different keys, so, if I understood correctly selecting WHERE key = #{key} won't give me any new key, right? Thanks! Carlos Alonso | Software Engineer | @calonso On 25 April 2016 at 09:22, Jens Rantil wrote

Re: Unable to reliably count keys on a thrift CF

2016-04-25 Thread Jens Rantil
Hi Carlos, In CQL, for the cornercase you describe, you could simply do SELECT * FROM tbl WHERE key=#{key} LIMIT 1000; and if it returns 1000 items, you'd iteratively do SELECT * FROM tbl WHERE key=#{key} AND column1 > #{last_col1_in_prev_query} LIMIT 1000; Also, have a look at fetchSi

Unable to reliably count keys on a thrift CF

2016-04-21 Thread Carlos Alonso
Hi guys. I've been struggling for the last days to find a reliable and stable way to count keys in a thrift column family. My idea is to basically iterate the whole ring using the token function, as documented here: https://docs.datastax.com/en/cql/3.1/cql/cql_using/paging_c.html in batches of 10