@Override public void complete( FlowProcess flowProcess, AggregatorCall<Context> aggregatorCall ) { aggregatorCall.getOutputCollector().add( getResult( aggregatorCall ) ); }
@Override public void aggregate( FlowProcess flowProcess, AggregatorCall<Context> aggregatorCall ) { TupleEntry entry = aggregatorCall.getArguments(); Context context = aggregatorCall.getContext(); Object arg = entry.getObject( 0 ); // returns canonical type if( ignoreValues != null && ignoreValues.contains( arg ) ) return; Comparable lhs = (Comparable) context.value.getObject( 0 ); Comparable rhs = (Comparable) arg; if( lhs == null || ( rhs != null && compare( lhs, rhs ) ) ) context.value.set( 0, rhs ); }