try {
ToKeySetCallback callback = new ToKeySetCallback();
keyspace.prepareQuery(CF_ALL_ROWS)
.getAllRows()
.withColumnRange(new RangeBuilder().setLimit(1).build())
.setRowLimit(5)
.setRepeatLastToken(false)
.executeWithCallback(callback);
Set<Long> set = callback.get();
LOG.info("Limit 1 row count: " + set.size() + " " + set.toString());
Assert.assertEquals(13, set.size());
} catch (ConnectionException e) {
Assert.fail();
}
try {
ToKeySetCallback callback = new ToKeySetCallback();
keyspace.prepareQuery(CF_ALL_ROWS)
.getAllRows()
.withColumnRange(new RangeBuilder().setLimit(0).build())
.setRepeatLastToken(false)
.setRowLimit(5)
.executeWithCallback(callback);
Set<Long> set = callback.get();