Query on how to count the total number of rowkeys and columns in them

2012-05-24 Thread Prakrati Agrawal
Hi I am trying to learn Cassandra and I have one doubt. I am using the Thrift API, to count the number of row keys I am using KeyRange to specify the row keys. To count all of them, I specify the start and end as new byte[0]. But the count is set to 100 by default. How do I use this method to

Re: Query on how to count the total number of rowkeys and columns in them

2012-05-24 Thread samal
default count is 100, set this to some max value, but this won't guarantee actual count. Something like paging can help in counting. Get the last key as start in second query, end as null, count as some value. But this will port data to client where as we only need count. Other solution may be

Re: Query on how to count the total number of rowkeys and columns in them

2012-05-24 Thread Віталій Тимчишин
You should read multiple batches specifying last key received from previous batch as first key for next one. For large databases I'd recommend you to use statistical approach (if it's feasible). With random parittioner it works well. Don't read the whole db. Knowing whole keyspace you can read