Examples of NullTap


Examples of com.liveramp.cascading_ext.tap.NullTap

    Pipe pipe = new Pipe("pipe");
    pipe = new Each(pipe, new FunctionStats(new MyFunction()));
    pipe = new Each(pipe, new MyFilter());

    Flow f = CascadingUtil.get().getFlowConnector().connect(source, new NullTap(), pipe);
    f.complete();

    System.out.println(Counters.getCounters(f));

    Assert.assertEquals(2l, Counters.get(f, "TestFunctionStats.java", "49 - MyFunction - Input records").longValue());
View Full Code Here

Examples of com.liveramp.cascading_ext.tap.NullTap

    Pipe input = new Pipe("input");
    input = new GroupBy(input, new Fields("field1"));
    input = new Every(input, new AggregatorStats(new MyAggregator()));

    Flow f = CascadingUtil.get().getFlowConnector().connect(source, new NullTap(), input);
    f.complete();

    Assert.assertEquals(4l, Counters.get(f, "TestAggregatorStats.java", "55 - MyAggregator - Input records").longValue());
    Assert.assertEquals(2l, Counters.get(f, "TestAggregatorStats.java", "55 - MyAggregator - Total output records").longValue());
  }
View Full Code Here

Examples of com.liveramp.cascading_ext.tap.NullTap

    Pipe input = new Pipe("input");
    input = new GroupBy(input, new Fields("field1"));
    input = new Every(input, new BufferStats(new MyBuffer()));

    Flow f = CascadingUtil.get().getFlowConnector().connect(source, new NullTap(), input);
    f.complete();

    Assert.assertEquals(2l, Counters.get(f, "TestBufferStats.java", "56 - MyBuffer - Output records").longValue());
    Assert.assertEquals(2l, Counters.get(f, "TestBufferStats.java", "56 - MyBuffer - Input groups").longValue());
  }
View Full Code Here

Examples of com.liveramp.cascading_ext.tap.NullTap

        new Fields("field1", "field2"));

    Pipe pipe = new Pipe("pipe");
    pipe = new Each(pipe, new FilterStats(new MyFilter()));

    Flow f = CascadingUtil.get().getFlowConnector().connect(source, new NullTap(), pipe);
    f.complete();

    Assert.assertEquals(2l, Counters.get(f, "TestFilterStats.java", "51 - MyFilter - Input records").longValue());
    Assert.assertEquals(1l, Counters.get(f, "TestFilterStats.java", "51 - MyFilter - Kept records").longValue());
    Assert.assertEquals(1l, Counters.get(f, "TestFilterStats.java", "51 - MyFilter - Removed records").longValue());
View Full Code Here

Examples of com.liveramp.cascading_ext.tap.NullTap

    Pipe pipe = new Pipe("pipe");
    pipe = new Increment(pipe, "Group", "CounterA");
    pipe = new Each(pipe, new FilterNull());
    pipe = new Increment(pipe, Counter.B);

    Flow f = CascadingUtil.get().getFlowConnector().connect(source, new NullTap(), pipe);
    f.complete();

    Assert.assertEquals(3l, Counters.get(f, "Group", "CounterA").longValue());
    Assert.assertEquals(2l, Counters.get(f, Counter.B).longValue());
  }
View Full Code Here

Examples of com.liveramp.cascading_ext.tap.NullTap

        new Fields("field"));

    Pipe pipe = new Pipe("pipe");
    pipe = new EachStats(pipe, new FilterNull());

    Flow f = CascadingUtil.get().getFlowConnector().connect(source, new NullTap(), pipe);
    f.complete();

    Assert.assertEquals(3l, Counters.get(f, "TestEachStats.java", "31 - FilterNull - Input records").longValue());
    Assert.assertEquals(2l, Counters.get(f, "TestEachStats.java", "31 - FilterNull - Kept records").longValue());
    Assert.assertEquals(1l, Counters.get(f, "TestEachStats.java", "31 - FilterNull - Removed records").longValue());
View Full Code Here

Examples of com.liveramp.cascading_ext.tap.NullTap

    Pipe pipe = new Pipe("pipe");
    pipe = new IncrementForFieldValues(pipe, "Group", "CounterA", new Fields("field"), Lists.<Integer>newArrayList(2));
    pipe = new IncrementForFieldValues(pipe, Counter.B, new Fields("field"), Lists.<Object>newArrayList((Object) null));

    Flow f = CascadingUtil.get().getFlowConnector().connect(source, new NullTap(), pipe);
    f.complete();

    Assert.assertEquals(2l, Counters.get(f, "Group", "CounterA").longValue());
    Assert.assertEquals(3l, Counters.get(f, Counter.B).longValue());
View Full Code Here

Examples of com.liveramp.cascading_ext.tap.NullTap

    Pipe pipe = new Pipe("pipe");
    pipe = new IncrementForFieldValues(pipe, "Group", "CounterA", new Fields("key", "value"), Lists.<Integer>newArrayList(1, 1));
    pipe = new IncrementForFieldValues(pipe, Counter.B, new Fields("key", "value"), Lists.<Object>newArrayList((Object) null, 2));

    Flow f = CascadingUtil.get().getFlowConnector().connect(source, new NullTap(), pipe);
    f.complete();

    Assert.assertEquals(2l, Counters.get(f, "Group", "CounterA").longValue());
    Assert.assertEquals(1l, Counters.get(f, Counter.B).longValue());
View Full Code Here

Examples of com.liveramp.cascading_ext.tap.NullTap

    Pipe pipe = new Pipe("pipe");
    pipe = new GroupBy(pipe, new Fields("field"));
    pipe = new EveryStats(pipe, new MyBuffer());

    Flow f = CascadingUtil.get().getFlowConnector().connect(source, new NullTap(), pipe);
    f.complete();

    Assert.assertEquals(2l, Counters.get(f, "TestEveryStats.java", "36 - MyBuffer - Input groups").longValue());
    Assert.assertEquals(4l, Counters.get(f, "TestEveryStats.java", "36 - MyBuffer - Output records").longValue());
  }
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.