Oops, I made a mistake thought I was paging on partition key when I actually was paging on columns. No need of token and columns are ordered. Sorry about bothering the ones who read this, it was a PEBCAK.


2013/8/21 Alain RODRIGUEZ <arodrime@gmail.com>
Hi, I am sorry about digging this up but I was in search of this kind of information and read this thread.

How to make sure that the first rowkey you select has the smaller token ? I mean when you perform "select rowkey from my_table limit N;" can you have any data with any token or is data token ordered by default ?

I tried it in dev and I have data with bigger token, but also with smaller token so I would have to do :
 select rowkey from my_table where token(rowkey) > token(last_rowkey_returned) limit N;
But also :
 select rowkey from my_table where token(rowkey) < token(last_rowkey_returned) limit N;
How to make sure you scan all your data, and only once, with CQL3 ? Am I misunderstanding or missing something ?


2013/5/14 aaron morton <aaron@thelastpickle.com>
select rowkey from my_table limit N;
while some_row_is_returned do
 select rowkey from my_table where token(rowkey) >
token(last_rowkey_returned) limit N;
That should work for you.


Aaron Morton
Freelance Cassandra Consultant
New Zealand


On 11/05/2013, at 9:23 AM, Thorsten von Eicken <tve@rightscale.com> wrote:

Thanks, this is interesting, but if I'm not mistaken, Astyanax uses CQL2. I'm trying to find a CQL3 solution on top the binary protocol. There has to be a way to do this in CQL3...?

On 5/10/2013 1:33 PM, Keith Wright wrote:
What you are proposing should work and I started to implement that using
multiple threads over the token ranges but decided instead to use to
Astyanax's read all rows recipe as it does much of that already.  It
required some work to convert the composite CQL2 format returned from
Astayanx into what is expected for CQL3 but did work.  Here's an outline
of what you would do: