public static final <K, A, B, C, D> CombineFn<K, Tuple4<A, B, C, D>> quadAggregator( AggregatorFactory<A> a1, AggregatorFactory<B> a2, AggregatorFactory<C> a3, AggregatorFactory<D> a4) { return aggregator(new QuadAggregator<A, B, C, D>(a1.create(), a2.create(), a3.create(), a4.create())); }
/** * @deprecated Use {@link Aggregators#MIN_FLOATS(int)} */ public static final <K> CombineFn<K, Float> MIN_FLOATS(int n) { return aggregator(new MinNAggregator<Float>(n)); }
/** * @deprecated Use {@link Aggregators#FIRST_N(int)} */ public static final <K, V> CombineFn<K, V> FIRST_N(int n) { return aggregator(new FirstNAggregator<V>(n)); }
@Override public void process( Pair<Pair<Integer, Integer>, Pair<Collection<Pair<K1, U>>, Collection<Pair<K2, V>>>> input, Emitter<Pair<Pair<K1, K2>, Pair<U, V>>> emitter) { for (Pair<K1, U> l: input.second().first()) { for (Pair<K2, V> r: input.second().second()) { emitter.emit(Pair.of(Pair.of(l.first(), r.first()), Pair.of(l.second(), r.second()))); } } } },