storm.kafka.bolt
Class KafkaBolt<K,V>

java.lang.Object
  extended by backtype.storm.topology.base.BaseComponent
      extended by backtype.storm.topology.base.BaseRichBolt
          extended by 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

Field Summary
static String BOLT_KEY
           
static String BOLT_MESSAGE
           
static String KAFKA_BROKER_PROPERTIES
           
static String TOPIC
           
 
Constructor Summary
KafkaBolt()
           
 
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
 

Field Detail

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
Constructor Detail

KafkaBolt

public KafkaBolt()
Method Detail

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.