Package com.netflix.astyanax.recipes.functions

Examples of com.netflix.astyanax.recipes.functions.RowCounterFunction


    }
   
    @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)
View Full Code Here

TOP

Related Classes of com.netflix.astyanax.recipes.functions.RowCounterFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.