Examples of BigDecimalColumnInterpreter


Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    scan.setStartRow(ROWS[5]);
    scan.setStopRow(ROWS[15]);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal min = aClient.min(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("5.00"), min);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addFamily(TEST_FAMILY);
    scan.setStartRow(HConstants.EMPTY_START_ROW);
    scan.setStopRow(HConstants.EMPTY_END_ROW);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal min = aClient.min(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("0.00"), min);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addFamily(TEST_FAMILY);
    scan.setStartRow(ROWS[6]);
    scan.setStopRow(ROWS[7]);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal min = aClient.min(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("0.60"), min);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

  public void testMinWithValidRangeWithNullCF() {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.setStartRow(ROWS[5]);
    scan.setStopRow(ROWS[15]);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal min = null;
    try {
      min = aClient.min(TEST_TABLE, ci, scan);
    } catch (Throwable e) {
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

    BigDecimal min = null;
    Scan scan = new Scan();
    scan.addFamily(TEST_FAMILY);
    scan.setStartRow(ROWS[4]);
    scan.setStopRow(ROWS[2]);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    try {
      min = aClient.min(TEST_TABLE, ci, scan);
    } catch (Throwable e) {
    }
    assertEquals(null, min);// control should go to the catch block
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addFamily(TEST_FAMILY);
    scan.setStartRow(ROWS[6]);
    scan.setStopRow(ROWS[6]);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal min = null;
    try {
      min = aClient.min(TEST_TABLE, ci, scan);
    } catch (Throwable e) {
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    Filter f = new PrefixFilter(Bytes.toBytes("foo:bar"));
    scan.setFilter(f);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal min = null;
    min = aClient.min(TEST_TABLE, ci, scan);
    assertEquals(null, min);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

  @Test
  public void testSumWithValidRange() throws Throwable {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal sum = aClient.sum(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("190.00"), sum);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    scan.setStartRow(ROWS[5]);
    scan.setStopRow(ROWS[15]);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal sum = aClient.sum(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("95.00"), sum);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter

  @Test
  public void testSumWithValidRangeWithNoCQ() throws Throwable {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addFamily(TEST_FAMILY);
    final ColumnInterpreter<BigDecimal, BigDecimal> ci = new BigDecimalColumnInterpreter();
    BigDecimal sum = aClient.sum(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("209.00"), sum); // 190 + 19
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.