storm.kafka
Class KafkaUtils

java.lang.Object
  extended by storm.kafka.KafkaUtils

public class KafkaUtils
extends Object


Nested Class Summary
static class KafkaUtils.KafkaOffsetMetric
           
 
Field Summary
static org.slf4j.Logger LOG
           
 
Constructor Summary
KafkaUtils()
           
 
Method Summary
static kafka.javaapi.message.ByteBufferMessageSet fetchMessages(KafkaConfig config, kafka.javaapi.consumer.SimpleConsumer consumer, Partition partition, long offset)
           
static Iterable<List<Object>> generateTuples(KafkaConfig kafkaConfig, kafka.message.Message msg)
           
static long getOffset(kafka.javaapi.consumer.SimpleConsumer consumer, String topic, int partition, KafkaConfig config)
           
static long getOffset(kafka.javaapi.consumer.SimpleConsumer consumer, String topic, int partition, long startOffsetTime)
           
static IBrokerReader makeBrokerReader(Map stormConf, KafkaConfig conf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.slf4j.Logger LOG
Constructor Detail

KafkaUtils

public KafkaUtils()
Method Detail

makeBrokerReader

public static IBrokerReader makeBrokerReader(Map stormConf,
                                             KafkaConfig conf)

getOffset

public static long getOffset(kafka.javaapi.consumer.SimpleConsumer consumer,
                             String topic,
                             int partition,
                             KafkaConfig config)

getOffset

public static long getOffset(kafka.javaapi.consumer.SimpleConsumer consumer,
                             String topic,
                             int partition,
                             long startOffsetTime)

fetchMessages

public static kafka.javaapi.message.ByteBufferMessageSet fetchMessages(KafkaConfig config,
                                                                       kafka.javaapi.consumer.SimpleConsumer consumer,
                                                                       Partition partition,
                                                                       long offset)

generateTuples

public static Iterable<List<Object>> generateTuples(KafkaConfig kafkaConfig,
                                                    kafka.message.Message msg)


Copyright © 2014. All rights reserved.