Examples of LongColumnInterpreter


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

  @Test
  public void testMedianWithValidRange() throws Throwable {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY,TEST_QUALIFIER);
    final ColumnInterpreter<Long, Long> ci = new LongColumnInterpreter();
    long median = aClient.median(TEST_TABLE, ci,
        scan);
    assertEquals(8L, median);
  }
View Full Code Here

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

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    scan.setStartRow(ROWS[2]);
    scan.setStopRow(ROWS[14]);
    final ColumnInterpreter<Long, Long> ci = new LongColumnInterpreter();
    long rowCount = aClient.rowCount(TEST_TABLE, ci, scan);
    assertEquals(12, rowCount);
  }
View Full Code Here

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

  @Test
  public void testRowCountAllTable() throws Throwable {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<Long, Long> ci = new LongColumnInterpreter();
    long rowCount = aClient.rowCount(TEST_TABLE, ci,
        scan);
    assertEquals(ROWSIZE, rowCount);
  }
View Full Code Here

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

    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    scan.setStartRow(ROWS[5]);
    scan.setStopRow(ROWS[2]);

    final ColumnInterpreter<Long, Long> ci = new LongColumnInterpreter();
    long rowCount = -1;
    try {
      rowCount = aClient.rowCount(TEST_TABLE, ci, scan);
    } catch (Throwable e) {
      myLog.error("Exception thrown in the invalidRange method"
View Full Code Here

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

    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    scan.setStartRow(ROWS[5]);
    scan.setStopRow(ROWS[5]);

    final ColumnInterpreter<Long, Long> ci = new LongColumnInterpreter();
    long rowCount = -1;
    try {
      rowCount = aClient.rowCount(TEST_TABLE, ci, scan);
    } catch (Throwable e) {
      rowCount = 0;
View Full Code Here

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

  public void testRowCountWithNullCF() {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.setStartRow(ROWS[5]);
    scan.setStopRow(ROWS[15]);
    final ColumnInterpreter<Long, Long> ci = new LongColumnInterpreter();
    long rowCount = -1;
    try {
      rowCount = aClient.rowCount(TEST_TABLE, ci, scan);
    } catch (Throwable e) {
       rowCount = 0;
View Full Code Here

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

  @Test
  public void testRowCountWithNullCQ() throws Throwable {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addFamily(TEST_FAMILY);
    final ColumnInterpreter<Long, Long> ci = new LongColumnInterpreter();
    long rowCount = aClient.rowCount(TEST_TABLE, ci,
        scan);
    assertEquals(20, rowCount);
  }
View Full Code Here

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

  @Test
  public void testRowCountWithPrefixFilter() throws Throwable {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<Long, Long> ci = new LongColumnInterpreter();
    Filter f = new PrefixFilter(Bytes.toBytes("foo:bar"));
    scan.setFilter(f);
    long rowCount = aClient.rowCount(TEST_TABLE, ci,
        scan);
    assertEquals(0, rowCount);
View Full Code Here

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

  @Test
  public void testMaxWithValidRange() throws Throwable {
    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<Long, Long> ci = new LongColumnInterpreter();
    long maximum = aClient.max(TEST_TABLE, ci, scan);
    assertEquals(19, maximum);
  }
View Full Code Here

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

    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<Long, Long> ci = new LongColumnInterpreter();
    long max = aClient.max(TEST_TABLE, ci, scan);
    assertEquals(14, max);
  }
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.