public abstract class BaseStatefulBolt<T extends State> extends Object implements IStatefulBolt<T>
| Constructor and Description |
|---|
BaseStatefulBolt() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
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) |
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, waitexecuteinitStatepublic void prepare(Map<String,Object> topoConf, TopologyContext context, OutputCollector collector)
prepare in interface IStatefulBolt<T extends State>IBolt.prepare(Map, TopologyContext, OutputCollector)public void cleanup()
cleanup in interface IStatefulBolt<T extends State>IBolt.cleanup()public void declareOutputFields(OutputFieldsDeclarer declarer)
IComponentDeclare the output schema for all the streams of this topology.
declareOutputFields in interface IComponentdeclarer - 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()
IComponentDeclare 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 IComponentpublic void preCommit(long txid)
IStatefulComponentThis 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)
IStatefulComponentThis 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()
IStatefulComponentThis 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 © 2019 The Apache Software Foundation. All rights reserved.