Tap source = getPlatform().getTextFile( inputFileApache );
Pipe pipe = new Pipe( "failing reducer" );
pipe = new Each( pipe, new Fields( "line" ), new RegexParser( new Fields( "ip" ), "^[^ ]*" ), new Fields( "ip" ) );
pipe = new GroupBy( pipe, new Fields( "ip" ) );
pipe = new Every( pipe, new TestFailAggregator( new Fields( "count" ), 1 ) );
Tap sink = getPlatform().getTextFile( getOutputPath( "reducerfail" ), SinkMode.REPLACE );
Flow flow = getPlatform().getFlowConnector().connect( "reducer fail test", source, sink, pipe );