public static class VertexCentricIteration.MessageCombinerUdf<K,Message> extends RichGroupReduceFunction<Tuple2<K,Either<NullValue,Message>>,Tuple2<K,Either<NullValue,Message>>> implements ResultTypeQueryable<Tuple2<K,Either<NullValue,Message>>>, GroupCombineFunction<Tuple2<K,Either<NullValue,Message>>,Tuple2<K,Either<NullValue,Message>>>
Modifier and Type | Method and Description |
---|---|
void |
combine(Iterable<Tuple2<K,Either<NullValue,Message>>> values,
Collector<Tuple2<K,Either<NullValue,Message>>> out)
The combine method, called (potentially multiple timed) with subgroups of elements.
|
TypeInformation<Tuple2<K,Either<NullValue,Message>>> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
void |
reduce(Iterable<Tuple2<K,Either<NullValue,Message>>> messages,
Collector<Tuple2<K,Either<NullValue,Message>>> out)
The reduce method.
|
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public TypeInformation<Tuple2<K,Either<NullValue,Message>>> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<Tuple2<K,Either<NullValue,Message>>>
public void reduce(Iterable<Tuple2<K,Either<NullValue,Message>>> messages, Collector<Tuple2<K,Either<NullValue,Message>>> out) throws Exception
GroupReduceFunction
reduce
in interface GroupReduceFunction<Tuple2<K,Either<NullValue,Message>>,Tuple2<K,Either<NullValue,Message>>>
reduce
in class RichGroupReduceFunction<Tuple2<K,Either<NullValue,Message>>,Tuple2<K,Either<NullValue,Message>>>
messages
- 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<Tuple2<K,Either<NullValue,Message>>> values, Collector<Tuple2<K,Either<NullValue,Message>>> out) throws Exception
GroupCombineFunction
combine
in interface GroupCombineFunction<Tuple2<K,Either<NullValue,Message>>,Tuple2<K,Either<NullValue,Message>>>
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–2018 The Apache Software Foundation. All rights reserved.