public static final class PlanUnwrappingSortedReduceGroupOperator.TupleUnwrappingGroupCombinableGroupReducer<IN,OUT,K1,K2> extends WrappingFunction<GroupReduceFunction<IN,OUT>> implements GroupReduceFunction<Tuple3<K1,K2,IN>,OUT>, GroupCombineFunction<Tuple3<K1,K2,IN>,Tuple3<K1,K2,IN>>
wrappedFunction
Modifier and Type | Method and Description |
---|---|
void |
combine(Iterable<Tuple3<K1,K2,IN>> values,
Collector<Tuple3<K1,K2,IN>> out)
The combine method, called (potentially multiple timed) with subgroups of elements.
|
void |
reduce(Iterable<Tuple3<K1,K2,IN>> values,
Collector<OUT> out)
The reduce method.
|
String |
toString() |
close, getWrappedFunction, open, setRuntimeContext
getIterationRuntimeContext, getRuntimeContext
public void reduce(Iterable<Tuple3<K1,K2,IN>> values, Collector<OUT> out) throws Exception
GroupReduceFunction
reduce
in interface GroupReduceFunction<Tuple3<K1,K2,IN>,OUT>
values
- All records that belong to the given input key.out
- The collector to hand results to.Exception
- This method may throw exceptions. Throwing an exception will cause the operation
to fail and may trigger recovery.public void combine(Iterable<Tuple3<K1,K2,IN>> values, Collector<Tuple3<K1,K2,IN>> out) throws Exception
GroupCombineFunction
combine
in interface GroupCombineFunction<Tuple3<K1,K2,IN>,Tuple3<K1,K2,IN>>
values
- The elements to be combined.out
- The collector to use to return values from the function.Exception
- The function may throw Exceptions, which will cause the program to cancel,
and may trigger the recovery logic.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.