private final String OUTPUT_PATH = getTestRoot() + "/output";
@Test
public void testMain() throws IOException {
Hfs source = new Hfs(new SequenceFile(new Fields("key", "a", "b")), INPUT_PATH);
TupleEntryCollector tc = source.openForWrite(CascadingUtil.get().getFlowProcess());
tc.add(new Tuple("k0", 1, 1));
tc.add(new Tuple("k0", 2, 5));
tc.add(new Tuple("k1", 1, 7));
tc.add(new Tuple("k1", -2, 10));
tc.add(new Tuple("k1", -2, -9));
tc.close();
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()),