public abstract class BaseStatefulBolt<T extends State> extends Object implements IStatefulBolt<T>
Constructor and Description |
---|
BaseStatefulBolt() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Analogue to bolt function.
|
void |
declareOutputFields(OutputFieldsDeclarer declarer)
Declare the output schema for all the streams of this topology.
|
Map<String,Object> |
getComponentConfiguration()
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 |
preRollback()
This is a hook for the component to perform some actions just before the framework rolls back the prepared state.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
initState
public void prepare(Map<String,Object> topoConf, TopologyContext context, OutputCollector collector)
IStatefulBolt
Analogue to bolt function.
prepare
in interface IStatefulBolt<T extends State>
IBolt.prepare(Map, TopologyContext, OutputCollector)
public void cleanup()
IStatefulBolt
Analogue to bolt function.
cleanup
in interface IStatefulBolt<T extends State>
IBolt.cleanup()
public void declareOutputFields(OutputFieldsDeclarer declarer)
IComponent
Declare the output schema for all the streams of this topology.
declareOutputFields
in interface IComponent
declarer
- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct streampublic Map<String,Object> getComponentConfiguration()
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 using TopologyBuilder
getComponentConfiguration
in interface IComponent
public void preCommit(long txid)
IStatefulComponent
This is a hook for the component to perform some actions just before the framework commits its state.
preCommit
in interface IStatefulComponent<T extends State>
public void prePrepare(long txid)
IStatefulComponent
This is a hook for the component to perform some actions just before the framework prepares its state.
prePrepare
in interface IStatefulComponent<T extends State>
public void preRollback()
IStatefulComponent
This is a hook for the component to perform some actions just before the framework rolls back the prepared state.
preRollback
in interface IStatefulComponent<T extends State>
Copyright © 2022 The Apache Software Foundation. All rights reserved.