Package org.apache.storm.topology.base
Class BaseStatefulBolt<T extends State>
java.lang.Object
org.apache.storm.topology.base.BaseStatefulBolt<T>
- All Implemented Interfaces:
Serializable
,IComponent
,IStatefulBolt<T>
,IStatefulComponent<T>
- Direct Known Subclasses:
StatefulWordCounter
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
Analogue to bolt function.void
declareOutputFields
(OutputFieldsDeclarer declarer) Declare the output schema for all the streams of this topology.Declare configuration specific to this component.void
preCommit
(long txid) This is a hook for the component to perform some actions just before the framework commits its state.void
prepare
(Map<String, Object> topoConf, TopologyContext context, OutputCollector collector) Analogue to bolt function.void
prePrepare
(long txid) This is a hook for the component to perform some actions just before the framework prepares its state.void
This is a hook for the component to perform some actions just before the framework rolls back the prepared state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.storm.topology.IStatefulBolt
execute
Methods inherited from interface org.apache.storm.topology.IStatefulComponent
initState
-
Constructor Details
-
BaseStatefulBolt
public BaseStatefulBolt()
-
-
Method Details
-
prepare
public void prepare(Map<String, Object> topoConf, TopologyContext context, OutputCollector collector) Description copied from interface:IStatefulBolt
Analogue to bolt function.- Specified by:
prepare
in interfaceIStatefulBolt<T extends State>
- See Also:
-
cleanup
public void cleanup()Description copied from interface:IStatefulBolt
Analogue to bolt function.- Specified by:
cleanup
in interfaceIStatefulBolt<T extends State>
- See Also:
-
declareOutputFields
Description copied from interface:IComponent
Declare the output schema for all the streams of this topology.- Specified by:
declareOutputFields
in interfaceIComponent
- Parameters:
declarer
- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream
-
getComponentConfiguration
Description copied from interface:IComponent
Declare configuration specific to this component. Only a subset of the "topology.*" configs can be overridden. The component configuration can be further overridden when constructing the topology usingTopologyBuilder
- Specified by:
getComponentConfiguration
in interfaceIComponent
-
preCommit
public void preCommit(long txid) Description copied from interface:IStatefulComponent
This is a hook for the component to perform some actions just before the framework commits its state.- Specified by:
preCommit
in interfaceIStatefulComponent<T extends State>
-
prePrepare
public void prePrepare(long txid) Description copied from interface:IStatefulComponent
This is a hook for the component to perform some actions just before the framework prepares its state.- Specified by:
prePrepare
in interfaceIStatefulComponent<T extends State>
-
preRollback
public void preRollback()Description copied from interface:IStatefulComponent
This is a hook for the component to perform some actions just before the framework rolls back the prepared state.- Specified by:
preRollback
in interfaceIStatefulComponent<T extends State>
-