views:

355

answers:

1

Assume a Cassandra datastore with 20 rows, with row keys named "r1" .. "r20".

Questions:

  • How do I fetch the row keys of the first ten rows (r1 to r10)?

  • How do I fetch the row keys of the next ten rows (r11 to r20)?

I'm looking for the Cassandra analogy to:

SELECT row_key FROM table LIMIT 0, 10;
SELECT row_key FROM table LIMIT 10, 10;
+4  A: 

Take a look at:

list<KeySlice> get_range_slices(keyspace, column_parent, predicate, range, consistency_level)

Where your KeyRange tuple is (start_key, end_key) == (r1, r10)

Schildmeijer