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
prepare
in interface IStatefulBolt<T extends State>
IBolt.prepare(Map, TopologyContext, OutputCollector)
public void cleanup()
IStatefulBolt
cleanup
in interface IStatefulBolt<T extends State>
IBolt.cleanup()
public void declareOutputFields(OutputFieldsDeclarer declarer)
IComponent
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
TopologyBuilder
getComponentConfiguration
in interface IComponent
public void preCommit(long txid)
IStatefulComponent
preCommit
in interface IStatefulComponent<T extends State>
public void prePrepare(long txid)
IStatefulComponent
prePrepare
in interface IStatefulComponent<T extends State>
public void preRollback()
IStatefulComponent
preRollback
in interface IStatefulComponent<T extends State>
Copyright © 2023 The Apache Software Foundation. All rights reserved.