.setExceptionCallback(new ExceptionCallback() { private int retries = 0;
@Test public void getAll() throws Exception { AtomicLong counter = new AtomicLong(0); OperationResult<Rows<String, String>> rows = keyspace .prepareQuery(CF_ALL_ROWS).getAllRows().setConcurrencyLevel(2).setRowLimit(30) //.withColumnRange(new RangeBuilder().setLimit(0).build()) .setExceptionCallback(new ExceptionCallback() { @Override public boolean onException(ConnectionException e) { Assert.fail(e.getMessage()); return true; } }).execute(); for (Row<String, String> row : rows.getResult()) { counter.incrementAndGet(); LOG.info("ROW: " + row.getKey() + " " + row.getColumns().size()); } LOG.info("Read " + counter.get() + " keys"); Assert.assertEquals(26, counter.get()); } }
.setExceptionCallback(new ExceptionCallback() { private int retries = 0;
.setExceptionCallback(new ExceptionCallback() { private int retries = 0;