Package org.apache.storm.starter.bolt
Class SlidingWindowSumBolt
java.lang.Object
org.apache.storm.topology.base.BaseWindowedBolt
org.apache.storm.starter.bolt.SlidingWindowSumBolt
- All Implemented Interfaces:
Serializable
,IComponent
,IWindowedBolt
Computes sliding window sum.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.storm.topology.base.BaseWindowedBolt
BaseWindowedBolt.Count, BaseWindowedBolt.Duration
-
Field Summary
Fields inherited from class org.apache.storm.topology.base.BaseWindowedBolt
timestampExtractor, windowConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
declareOutputFields
(OutputFieldsDeclarer declarer) Declare the output schema for all the streams of this topology.void
execute
(TupleWindow inputWindow) Process the tuple window and optionally emit new tuples based on the tuples in the input window.void
prepare
(Map<String, Object> topoConf, TopologyContext context, OutputCollector collector) This is similar to theIBolt.prepare(Map, TopologyContext, OutputCollector)
except that while emitting, the tuples are automatically anchored to the tuples in the inputWindow.Methods inherited from class org.apache.storm.topology.base.BaseWindowedBolt
cleanup, getComponentConfiguration, getTimestampExtractor, withLag, withLateTupleStream, withTimestampExtractor, withTimestampField, withTumblingWindow, withTumblingWindow, withWatermarkInterval, withWindow, withWindow, withWindow, withWindow, withWindow, withWindow
-
Constructor Details
-
SlidingWindowSumBolt
public SlidingWindowSumBolt()
-
-
Method Details
-
prepare
public void prepare(Map<String, Object> topoConf, TopologyContext context, OutputCollector collector) Description copied from interface:IWindowedBolt
This is similar to theIBolt.prepare(Map, TopologyContext, OutputCollector)
except that while emitting, the tuples are automatically anchored to the tuples in the inputWindow.- Specified by:
prepare
in interfaceIWindowedBolt
- Overrides:
prepare
in classBaseWindowedBolt
-
execute
Description copied from interface:IWindowedBolt
Process the tuple window and optionally emit new tuples based on the tuples in the input window. -
declareOutputFields
Description copied from interface:IComponent
Declare the output schema for all the streams of this topology.- Specified by:
declareOutputFields
in interfaceIComponent
- Overrides:
declareOutputFields
in classBaseWindowedBolt
- Parameters:
declarer
- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream
-