Re: Cassandra pytho pagination

2013-12-23 Thread Aaron Morton
> Is there something wrong with it? Here 1234555665_53323232 and > 2344555665_53323232 are super columns. Also, If I have to represent this data > with new composite comparator, How will I accomplish that? > > Composite types via pycassa http://pycassa.github.io/pycassa/assorted/composite_typ

Re: Cassandra pytho pagination

2013-12-23 Thread Aaron Morton
> First approach: Sounds good. > Second approach ( I used in production ): If the row gets big enough this will have bad performance. A - Aaron Morton New Zealand @aaronmorton Co-Founder & Principal Consultant Apache Cassandra Consulting http://www.thelastpickle.com On 19/12

Re: Cassandra pytho pagination

2013-12-19 Thread Kumar Ranjan
Rob - I got a question following your advice. This is how, I define my column family validators = { 'approved':'UTF8Type', 'tid': 'UTF8Type', 'iid': 'UTF8Type', 'score': 'IntegerType', 'likes': 'Intege

Re: Cassandra pytho pagination

2013-12-18 Thread Robert Coli
On Wed, Dec 18, 2013 at 1:28 PM, Kumar Ranjan wrote: > Second approach ( I used in production ): > - fetch all super columns for a row key > Stock response mentioning that super columns are anti-advised for use, especially in brand new code. =Rob

Re: Cassandra pytho pagination

2013-12-18 Thread Kumar Ranjan
I am using pycassa. So, here is how I solved this issue. Will discuss 2 approaches. First approach didn't work out for me. Thanks Aaron for your attention. First approach: - Say if column_count = 10 - collect first 11 rows, sort first 10, send it to user (front end) as JSON object and last=11th_co

Re: Cassandra pytho pagination

2013-12-17 Thread Aaron Morton
CQL3 and thrift do not support an offset clause, so you can only really support next / prev page calls to the database. > I am trying to use xget with column_count and buffer_size parameters. Can > someone explain me, how does it work? From doc, my understanding is that, I > can do something l

Cassandra pytho pagination

2013-12-12 Thread Kumar Ranjan
Hey Folks, I need some ideas about support implementing of pagination on the browser, from the backend. So python code (backend) gets request from frontend with page=1,2,3,4 and so on and count_per_page=50. I am trying to use xget with column_count and buffer_size parameters. Can someone explain