Examples of ExactAggregatorDefinition


Examples of com.liveramp.cascading_ext.combiner.lib.ExactAggregatorDefinition

    Tap sink = new Hfs(new SequenceFile(new Fields("key", "a_sum", "b_sum", "a_b_sum", "a_b_sum_doubled")), OUTPUT_PATH);

    Pipe pipe = new Pipe("pipe");
    pipe = Combiner.assembly(pipe,
        new MultiExactAggregator(
            new ExactAggregatorDefinition(new Fields("a"), new Fields("a_sum"), new Aggregator()),
            new ExactAggregatorDefinition(new Fields("b"), new Fields("b_sum"), new Aggregator()),
            new ExactAggregatorDefinition(new Fields("a", "b"), new Fields("a_b_sum"), new OtherAggregator())),
        new Fields("key"),
        new Fields("a", "b"),
        new Fields("a_sum", "b_sum", "a_b_sum", "a_b_sum_doubled"));

    CascadingUtil.get().getFlowConnector().connect(source, sink, pipe).complete();
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.