cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wicked J <>
Subject How to get all rows inserted
Date Tue, 19 Oct 2010 20:39:59 GMT
I inserted 500 rows (records) in Cassandra and I'm using the following code
to retrieve all the inserted rows. However, I'm able to get only 100 rows
(in a random order). I'm using Cassandra v0.6.4 with OrderPreserving
Partition on a single node/instance.
How can I get all the rows inserted? i.e. the other 400 rows.


== Code ==

KeyRange keyRange = new KeyRange();
keyRange.start_key = start; //1
keyRange.end_key = end; //500

SliceRange sliceRange = new SliceRange();
sliceRange.setStart(new byte[]{});
sliceRange.setFinish(new byte[]{});

SlicePredicate slicePredicate = new SlicePredicate();

ColumnParent columnParent = new ColumnParent(COLUMN_FAMILY);
keySlices = client.get_range_slices(KEYSPACE, columnParent, slicePredicate,
keyRange, ConsistencyLevel.ONE);
System.out.println("Key Slice Size="+keySlices.size());

View raw message