Package org.apache.hadoop.mapred.StatisticsCollector

Examples of org.apache.hadoop.mapred.StatisticsCollector.TimeWindow


public class TestStatisticsCollector extends TestCase{

  public void testMovingWindow() throws Exception {
    StatisticsCollector collector = new StatisticsCollector(1);
    TimeWindow window = new TimeWindow("test", 6, 2);
    TimeWindow sincStart = StatisticsCollector.SINCE_START;
    TimeWindow[] windows = {sincStart, window};
   
    Stat stat = collector.createStat("m1", windows);
   
    stat.inc(3);
View Full Code Here


    assertEquals(95, stat.getValues().get(sincStart).getValue());
  }

  public void testBucketing() throws Exception {
    StatisticsCollector collector = new StatisticsCollector();
    TimeWindow window = new TimeWindow("test", 33, 11);
    // We'll collect 3 buckets before we start removing: 33 / 11 = 3
    // We'll do 2 updates per bucket (5 is default period): 11 / 5 = 2
    TimeWindow[] windows = {window};
    Stat stat1 = collector.createStat("TaskTracker A", windows);
View Full Code Here

  @SuppressWarnings("rawtypes")
  @Test (timeout =20000)
  public void testMovingWindow() throws Exception {
    StatisticsCollector collector = new StatisticsCollector(1);
    TimeWindow window = new TimeWindow("test", 6, 2);
    TimeWindow sincStart = StatisticsCollector.SINCE_START;
    TimeWindow[] windows = {sincStart, window};
   
    Stat stat = collector.createStat("m1", windows);
   
    stat.inc(3);
View Full Code Here

public class TestStatisticsCollector extends TestCase{

  @SuppressWarnings("rawtypes")
  public void testMovingWindow() throws Exception {
    StatisticsCollector collector = new StatisticsCollector(1);
    TimeWindow window = new TimeWindow("test", 6, 2);
    TimeWindow sincStart = StatisticsCollector.SINCE_START;
    TimeWindow[] windows = {sincStart, window};
   
    Stat stat = collector.createStat("m1", windows);
   
    stat.inc(3);
View Full Code Here

public class TestStatisticsCollector extends TestCase{

  public void testMovingWindow() throws Exception {
    StatisticsCollector collector = new StatisticsCollector(1);
    TimeWindow window = new TimeWindow("test", 6, 2);
    TimeWindow sincStart = StatisticsCollector.SINCE_START;
    TimeWindow[] windows = {sincStart, window};
   
    Stat stat = collector.createStat("m1", windows);
   
    stat.inc(3);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapred.StatisticsCollector.TimeWindow

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.