}
@Test
public void testAllRowsReaderCopier() throws Exception {
final ColumnCounterFunction columnCounter = new ColumnCounterFunction();
final RowCounterFunction rowCounter = new RowCounterFunction();
new AllRowsReader.Builder<String, String>(keyspace, CF_STANDARD1)
.withPageSize(3)
.withConcurrencyLevel(2)
.forEachRow(columnCounter)
.build()
.call();
LOG.info("Column count = " + columnCounter.getCount());
new AllRowsReader.Builder<String, String>(keyspace, CF_STANDARD1)
.withPageSize(3)
.withConcurrencyLevel(2)
.forEachRow(rowCounter)
.build()
.call();
LOG.info("Row count = " + rowCounter.getCount());
new AllRowsReader.Builder<String, String>(keyspace, CF_STANDARD1)
.withPageSize(3)
.withConcurrencyLevel(2)
.forEachRow(RowCopierFunction.builder(keyspace, CF_STANDARD1_COPY).build())
.build()
.call();
rowCounter.reset();
new AllRowsReader.Builder<String, String>(keyspace, CF_STANDARD1_COPY)
.withPageSize(3)
.withConcurrencyLevel(2)
.forEachRow(rowCounter)
.build()
.call();
LOG.info("Copied row count = " + rowCounter.getCount());
LOG.info("CF_STANDARD1");
new AllRowsReader.Builder<String, String>(keyspace, CF_STANDARD1)
.withPageSize(3)
.withConcurrencyLevel(2)