public class KafkaBolt<K,V> extends 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.
Modifier and Type | Field and Description |
---|---|
static String |
KAFKA_BROKER_PROPERTIES |
static String |
TOPIC |
Constructor and Description |
---|
KafkaBolt() |
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer declarer) |
void |
execute(Tuple input) |
void |
prepare(Map stormConf,
TopologyContext context,
OutputCollector collector) |
KafkaBolt<K,V> |
withTopicSelector(KafkaTopicSelector selector) |
KafkaBolt<K,V> |
withTupleToKafkaMapper(TupleToKafkaMapper<K,V> mapper) |
cleanup
getComponentConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentConfiguration
public static final String TOPIC
public static final String KAFKA_BROKER_PROPERTIES
public KafkaBolt<K,V> withTopicSelector(KafkaTopicSelector selector)
public void prepare(Map stormConf, TopologyContext context, OutputCollector collector)
public void execute(Tuple input)
public void declareOutputFields(OutputFieldsDeclarer declarer)
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.