Class GeneralReduceByKeyAndWindowOperator<R,K,T>
- java.lang.Object
-
- org.apache.heron.api.bolt.BaseWindowedBolt
-
- org.apache.heron.streamlet.impl.operators.StreamletWindowOperator<R,KeyValue<KeyedWindow<K>,T>>
-
- org.apache.heron.streamlet.impl.operators.GeneralReduceByKeyAndWindowOperator<R,K,T>
-
- All Implemented Interfaces:
Serializable
,IWindowedBolt
,IComponent
,IStreamletOperator<R,KeyValue<KeyedWindow<K>,T>>
,IStreamletWindowOperator<R,KeyValue<KeyedWindow<K>,T>>
public class GeneralReduceByKeyAndWindowOperator<R,K,T> extends StreamletWindowOperator<R,KeyValue<KeyedWindow<K>,T>>
ReduceByKeyAndWindowOperator is the class that implements reduceByKeyAndWindow functionality. It takes in a reduceFunction Function as an input. For every time window, the bolt goes over all the tuples in that window and applies the reduce function grouped by keys. It emits a KeyedWindow, reduced Value KeyPairs as outputs R: Incoming data type, K: Key type, T: Result data type- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.heron.api.bolt.BaseWindowedBolt
BaseWindowedBolt.Count
-
-
Field Summary
-
Fields inherited from class org.apache.heron.streamlet.impl.operators.StreamletWindowOperator
collector
-
Fields inherited from class org.apache.heron.api.bolt.BaseWindowedBolt
timestampExtractor, windowConfiguration
-
-
Constructor Summary
Constructors Constructor Description GeneralReduceByKeyAndWindowOperator(SerializableFunction<R,K> keyExtractor, T identity, SerializableBiFunction<T,R,? extends T> reduceFn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(TupleWindow inputWindow)
Process the tuple window and optionally emit new tuples based on the tuples in the input window.-
Methods inherited from class org.apache.heron.streamlet.impl.operators.StreamletWindowOperator
declareOutputFields, prepare
-
Methods inherited from class org.apache.heron.api.bolt.BaseWindowedBolt
cleanup, getComponentConfiguration, getTimestampExtractor, withCustomEvictor, withCustomTrigger, withLag, withLateTupleStream, withTimestampExtractor, withTimestampField, withTumblingWindow, withTumblingWindow, withWatermarkInterval, withWindow, withWindow, withWindow, withWindow, withWindow, withWindow
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.heron.api.topology.IComponent
getComponentConfiguration
-
Methods inherited from interface org.apache.heron.api.bolt.IWindowedBolt
cleanup, getTimestampExtractor
-
-
-
-
Constructor Detail
-
GeneralReduceByKeyAndWindowOperator
public GeneralReduceByKeyAndWindowOperator(SerializableFunction<R,K> keyExtractor, T identity, SerializableBiFunction<T,R,? extends T> reduceFn)
-
-
Method Detail
-
execute
public void execute(TupleWindow inputWindow)
Description copied from interface:IWindowedBolt
Process the tuple window and optionally emit new tuples based on the tuples in the input window.
-
-