public class EncColMultBolt
extends org.apache.storm.topology.base.BaseRichBolt
Takes <columnIndex, columnValue>
tuples as input and aggregates (multiplies) the columnValues for a given columnIndex as they are received.
EncRowCalcBolts send flush signals to the EncColMultBolts indicating that they have finished sending all tuples for a session. Whenever a flush signal is received from a EncRowCalcBolt, the num of received flush signals is tallied until each EncRowCalcBolt has emitted a flush signal.
Once a flush signal has been received from each EncRowCalcBolt, all <columnIndex, aggregate colVal product>
tuples are sent to the OutputBolt and a
session_end signal is sent back to each EncRowMultBolt.
The EncRowMultBolts buffer their output from the time that they send a flush signal to the EncColMultBolts until the time that they receive a session_end signal from all of the EncColMultBolts.
Constructor and Description |
---|
EncColMultBolt() |
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer outputFieldsDeclarer) |
void |
execute(org.apache.storm.tuple.Tuple tuple) |
void |
prepare(java.util.Map map,
org.apache.storm.task.TopologyContext topologyContext,
org.apache.storm.task.OutputCollector collector) |
public void prepare(java.util.Map map, org.apache.storm.task.TopologyContext topologyContext, org.apache.storm.task.OutputCollector collector)
public void execute(org.apache.storm.tuple.Tuple tuple)
public void declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer outputFieldsDeclarer)