@Test
public void testSimpleCombinerWithMemoryLimit() throws IOException {
Hfs source = new Hfs(new SequenceFile(new Fields("key", "value")), INPUT_PATH);
TupleEntryCollector tc = source.openForWrite(CascadingUtil.get().getFlowProcess());
tc.add(new Tuple("key0", 1));
tc.add(new Tuple("key0", 2));
tc.add(new Tuple("key1", 1));
tc.add(new Tuple("key1", -3));
tc.add(new Tuple("key0", 10));
tc.close();
Tap sink = new Hfs(new SequenceFile(new Fields("key", "sum")), OUTPUT_PATH);
Pipe pipe = new Pipe("pipe");
pipe = new Each(pipe, Combiner.function(new SimpleAggregator(), new Fields("key"), new Fields("value"), new Fields("sum"), MemoryBoundLruHashMap.UNLIMITED_ITEM_CAPACITY, 100, new SimpleTupleMemoryUsageEstimator(), new LongMemoryUsageEstimator(), false));