public class ModuleNode<T,V>
extends org.thales.punch.libraries.storm.api.BaseProcessingNode
Constructor and Description |
---|
ModuleNode(org.thales.punch.libraries.storm.api.NodeSettings boltConfig,
Serializable module,
org.thales.punch.libraries.storm.api.ITopologySettings topoConfig) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
void |
declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer declarer)
This bolt does not add any new field to the stream.
|
void |
prepare(Map stormConf,
org.apache.storm.task.TopologyContext context,
org.apache.storm.task.OutputCollector collector)
Prepare this bolt.
|
void |
process(org.apache.storm.tuple.Tuple tuple)
The execute method is called by storm whenever some new tuples traverse the
topology.
|
ModuleNode<T,V> |
setConvertors(IInputTupleConverter<T> in,
IOutputTupleConverter<V> out) |
public ModuleNode(org.thales.punch.libraries.storm.api.NodeSettings boltConfig, Serializable module, org.thales.punch.libraries.storm.api.ITopologySettings topoConfig)
boltConfig
- the bolt configurationmodule
- the module to be createdtopoConfig
- the topo configurationpublic ModuleNode<T,V> setConvertors(IInputTupleConverter<T> in, IOutputTupleConverter<V> out)
in
- the module input typeout
- the module output typepublic void prepare(Map stormConf, org.apache.storm.task.TopologyContext context, org.apache.storm.task.OutputCollector collector)
prepare
in interface org.apache.storm.task.IBolt
prepare
in class org.thales.punch.libraries.storm.api.BaseProcessingNode
public void process(org.apache.storm.tuple.Tuple tuple)
process
in class org.thales.punch.libraries.storm.api.BaseProcessingNode
tuple
- the input storm tuple.public void declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer declarer)
declareOutputFields
in interface org.apache.storm.topology.IComponent
declareOutputFields
in class org.thales.punch.libraries.storm.api.BaseProcessingNode
public void cleanup()
cleanup
in interface org.apache.storm.task.IBolt
cleanup
in class org.thales.punch.libraries.storm.api.BaseProcessingNode
Copyright © 2022. All rights reserved.