storm.kafka.bolt
Class KafkaBolt<K,V>
java.lang.Object
backtype.storm.topology.base.BaseComponent
backtype.storm.topology.base.BaseRichBolt
storm.kafka.bolt.KafkaBolt<K,V>
- All Implemented Interfaces:
- backtype.storm.task.IBolt, backtype.storm.topology.IComponent, backtype.storm.topology.IRichBolt, Serializable
public class KafkaBolt<K,V>
- extends backtype.storm.topology.base.BaseRichBolt
Bolt implementation that can send Tuple data to Kafka
It expects the producer configuration and topic in storm config under
'kafka.broker.properties' and 'topic'
respectively.
- See Also:
- Serialized Form
|
Method Summary |
void |
declareOutputFields(backtype.storm.topology.OutputFieldsDeclarer declarer)
|
void |
execute(backtype.storm.tuple.Tuple input)
|
void |
prepare(Map stormConf,
backtype.storm.task.TopologyContext context,
backtype.storm.task.OutputCollector collector)
|
| Methods inherited from class backtype.storm.topology.base.BaseRichBolt |
cleanup |
| Methods inherited from class backtype.storm.topology.base.BaseComponent |
getComponentConfiguration |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface backtype.storm.topology.IComponent |
getComponentConfiguration |
TOPIC
public static final String TOPIC
- See Also:
- Constant Field Values
KAFKA_BROKER_PROPERTIES
public static final String KAFKA_BROKER_PROPERTIES
- See Also:
- Constant Field Values
BOLT_KEY
public static final String BOLT_KEY
- See Also:
- Constant Field Values
BOLT_MESSAGE
public static final String BOLT_MESSAGE
- See Also:
- Constant Field Values
KafkaBolt
public KafkaBolt()
prepare
public void prepare(Map stormConf,
backtype.storm.task.TopologyContext context,
backtype.storm.task.OutputCollector collector)
execute
public void execute(backtype.storm.tuple.Tuple input)
declareOutputFields
public void declareOutputFields(backtype.storm.topology.OutputFieldsDeclarer declarer)
Copyright © 2014. All rights reserved.