public class WordCounter extends BaseBasicBolt
| Constructor and Description |
|---|
WordCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
void |
declareOutputFields(OutputFieldsDeclarer declarer)
Declare the output schema for all the streams of this topology.
|
void |
execute(Tuple input,
BasicOutputCollector collector)
Process the input tuple and optionally emit new tuples based on the input tuple.
|
Map<String,Object> |
getComponentConfiguration()
Declare configuration specific to this component.
|
void |
prepare(Map<String,Object> topoConf,
TopologyContext context) |
public void prepare(Map<String,Object> topoConf, TopologyContext context)
prepare in interface IBasicBoltprepare in class BaseBasicBoltpublic void execute(Tuple input, BasicOutputCollector collector)
IBasicBoltAll acking is managed for you. Throw a FailedException if you want to fail the tuple.
public void cleanup()
cleanup in interface IBasicBoltcleanup in class BaseBasicBoltpublic void declareOutputFields(OutputFieldsDeclarer declarer)
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()
IComponentTopologyBuildergetComponentConfiguration in interface IComponentgetComponentConfiguration in class BaseComponentCopyright © 2023 The Apache Software Foundation. All rights reserved.