|
Hi,
Is it possible to iterate and fetch in chunks using thrift API by querying using "secondary indexes"? -Vivek
|
Yes.use get_indexed_slices (http://wiki.apache.org/cassandra/API)
On Tue, Mar 13, 2012 at 2:12 PM, Vivek Mishra <[hidden email]> wrote: Hi, |
|
Thanks.
How do i iterate using it? How do i ensure that it should not return me previous results(without i need to keep something in-memory)? This is the method i am looking into: get_indexed_slices(ColumnParent column_parent, IndexClause index_clause, SlicePredicate column_predicate, ConsistencyLevel consistency_level) It does not have anything like count. Thanks, Vivek On Tue, Mar 13, 2012 at 6:24 PM, Shimi Kiviti <[hidden email]> wrote:
|
|
If you want 100 results per call, ask for 101. Use the first 100, when you get to the 101'st do not examine it's data. Instead use it's key as the start to get the next 101.
Cheers On 14/03/2012, at 2:03 AM, Vivek Mishra wrote: Thanks. |
|
Are you writing a new client for a language that doesn't have good drivers? If not, most of the existing clients already break up the query into chunks, I think.
The pycassa implementation of this might be a useful reference: https://github.com/pycassa/pycassa/blob/master/pycassa/columnfamily.py#L561 On Wed, Mar 14, 2012 at 2:35 AM, aaron morton <[hidden email]> wrote:
-- Tyler Hobbs DataStax |
| Powered by Nabble | Edit this page |
