Package cellmate.accumulo.reader

Examples of cellmate.accumulo.reader.AccumuloAggregateDBResultReader


    }

    @Test
    public void countDistinctRows() {
        AccumuloParameters localParams = builder.setColumns(new String[]{"info"}).build();
        AccumuloAggregateDBResultReader reader = new AccumuloAggregateDBResultReader (mockInstance);
        assertNotNull(reader);
        List<CellGroup<IntValueCell>> items = reader.read(localParams, AccumuloCellTransformers.distinctRowIDCount());
        assertNotNull(items);
        assertEquals(items.size(), 1);
        try {
            int value = extractor.getIntValueFromFirstCell(items.get(0).getInternalList());
            assertNotNull(value);
View Full Code Here


    }

    @Test
    public void singleValueAgg() {
        AccumuloParameters localParams = builder.setColumns(new String[]{"info:age"}).build();
        AccumuloAggregateDBResultReader reader = new AccumuloAggregateDBResultReader(mockInstance);
        assertNotNull(reader);
        List<CellGroup<IntValueCell>> items = reader.read(localParams, AccumuloCellTransformers.aggregateSingleQual("age"));
        assertNotNull(items);
        assertEquals(items.size(), 1);
        try {
            int value = extractor.getIntValueByLabel(items.get(0).getInternalList(), "age");
            assertNotNull(value);
View Full Code Here

    }

    @Test
    public void multiValueAgg() {
        AccumuloParameters localParams = builder.setColumns(new String[]{"info:age", "info:siblings"}).build();
        AccumuloAggregateDBResultReader reader = new AccumuloAggregateDBResultReader(mockInstance);
        assertNotNull(reader);
        List<CellGroup<IntValueCell>> items = reader.read(localParams, AccumuloCellTransformers.aggregateMultiQual("age", "siblings"));
        assertNotNull(items);
        assertEquals(items.size(), 1);
        try {
            int ageCount = extractor.getIntValueByLabel(items.get(0).getInternalList(), "age");
            assertEquals(ageCount, 59);
View Full Code Here

    }

    @Test
    public void singleValueMean() {
        AccumuloParameters localParams = builder.setColumns(new String[]{"info:age"}).build();
        AccumuloAggregateDBResultReader reader =
                new AccumuloAggregateDBResultReader(mockInstance);
        assertNotNull(reader);
        List<CellGroup<DoubleValueCell>> items = reader.read(localParams, AccumuloCellTransformers.averageSingleQual("age"));
        assertNotNull(items);
        assertEquals(items.size(), 1);
        try {
            double average = extractor.getDoubleValueByLabel(items.get(0).getInternalList(), "age");
            assertNotNull(average);
View Full Code Here


    @Test
    public void countTotalKeyValues() {
        AccumuloParameters localParams = builder.setColumns(new String[]{"info"}).build();
        AccumuloAggregateDBResultReader reader = new AccumuloAggregateDBResultReader(mockInstance);
        assertNotNull(reader);
        List<CellGroup<IntValueCell>> items = reader.read(localParams, AccumuloCellTransformers.totalKeyValueCount());
        assertNotNull(items);
        assertEquals(items.size(), 1);
        try {
            int value = extractor.getIntValueFromFirstCell(items.get(0).getInternalList());
            assertNotNull(value);
View Full Code Here

TOP

Related Classes of cellmate.accumulo.reader.AccumuloAggregateDBResultReader

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.