Package org.apache.hadoop.hbase.client.coprocessor

Examples of org.apache.hadoop.hbase.client.coprocessor.AggregationClient.median()


  public void testMedianWithValidRange() 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 median = aClient.median(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("8.00"), median);
  }

  /**
   * ***************Test cases for Maximum *******************
 
View Full Code Here


  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

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<BigDecimal, BigDecimal, EmptyMsg, BigDecimalMsg, BigDecimalMsg> ci =
      new BigDecimalColumnInterpreter();
    BigDecimal median = aClient.median(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("8.00"), median);
  }

  /**
   * ***************Test cases for Maximum *******************
 
View Full Code Here

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY,TEST_QUALIFIER);
    final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
        new LongColumnInterpreter();
    long median = aClient.median(TEST_TABLE, ci,
        scan);
    assertEquals(8L, median);
  }

  /**
 
View Full Code Here

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<Double, Double, EmptyMsg, DoubleMsg, DoubleMsg> ci =
        new DoubleColumnInterpreter();
    double median = aClient.median(TEST_TABLE, ci, scan);
    assertEquals(8.00, median, 0.00);
  }

  /**
   * ***************Test cases for Maximum *******************
 
View Full Code Here

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<BigDecimal, BigDecimal, EmptyMsg, BigDecimalMsg, BigDecimalMsg> ci =
      new BigDecimalColumnInterpreter();
    BigDecimal median = aClient.median(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("8.00"), median);
  }

  /**
   * ***************Test cases for Maximum *******************
 
View Full Code Here

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY,TEST_QUALIFIER);
    final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
        new LongColumnInterpreter();
    long median = aClient.median(TEST_TABLE, ci,
        scan);
    assertEquals(8L, median);
  }

  /**
 
View Full Code Here

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY,TEST_QUALIFIER);
    final ColumnInterpreter<Long, Long, EmptyMsg, LongMsg, LongMsg> ci =
        new LongColumnInterpreter();
    long median = aClient.median(TEST_TABLE, ci,
        scan);
    assertEquals(8L, median);
  }

  /**
 
View Full Code Here

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<Double, Double, EmptyMsg, DoubleMsg, DoubleMsg> ci =
        new DoubleColumnInterpreter();
    double median = aClient.median(TEST_TABLE, ci, scan);
    assertEquals(8.00, median, 0.00);
  }

  /**
   * ***************Test cases for Maximum *******************
 
View Full Code Here

    AggregationClient aClient = new AggregationClient(conf);
    Scan scan = new Scan();
    scan.addColumn(TEST_FAMILY, TEST_QUALIFIER);
    final ColumnInterpreter<BigDecimal, BigDecimal, EmptyMsg, BigDecimalMsg, BigDecimalMsg> ci =
      new BigDecimalColumnInterpreter();
    BigDecimal median = aClient.median(TEST_TABLE, ci, scan);
    assertEquals(new BigDecimal("8.00"), median);
  }

  /**
   * ***************Test cases for Maximum *******************
 
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.