@Test public void getAllWithCallback() throws Exception { final AtomicLong counter = new AtomicLong(); keyspace.prepareQuery(CF_ALL_ROWS).getAllRows() .setRowLimit(30) .setRepeatLastToken(false) .setConcurrencyLevel(2) //.withColumnRange(new RangeBuilder().setLimit(2).build()) .executeWithCallback(new RowCallback<String, String>() { @Override public void success(Rows<String, String> rows) { for (Row<String, String> row : rows) { LOG.info("ROW: " + row.getKey() + " " + row.getColumns().size()); counter.incrementAndGet(); } } @Override public boolean failure(ConnectionException e) { LOG.error(e.getMessage(), e); return false; } }); LOG.info("Read " + counter.get() + " keys"); Assert.assertEquals(26, counter.get()); }