Package kafka.utils

Examples of kafka.utils.VerifiableProperties


*/
public class IntegerEncoderDecoder implements Encoder<Integer>, Decoder<Integer> {


  public IntegerEncoderDecoder() {
    this(new VerifiableProperties());
  }
View Full Code Here


        }

        this.keyTopicMap = keyTopicMap != null ? keyTopicMap : Maps.<String, String>newHashMap();

        producer = new Producer<Long, byte[]>(new ProducerConfig(props));
        KafkaMetricsReporter$.MODULE$.startReporters(new VerifiableProperties(props));

        Monitors.registerObject(clientId, this);
    }
View Full Code Here

            final ConsumerConnector consumer =
                    kafka.consumer.Consumer.createJavaConsumerConnector(createConsumerConfig());
            final Map<String, Integer> topicCountMap = ImmutableMap.of(topic, 1);
            final Map<String, List<KafkaStream<String,String>>> consumerMap;

            StringDecoder decoder = new StringDecoder(new VerifiableProperties());
            consumerMap = consumer.createMessageStreams(topicCountMap, decoder,  decoder);

            final KafkaStream<String,String> stream = consumerMap.get(topic).get(0);
            final ConsumerIterator<String,String> iterator = stream.iterator();
            while (iterator.hasNext()) {
View Full Code Here

        final ConsumerConnector   consumer =
                kafka.consumer.Consumer.createJavaConsumerConnector(createConsumerConfig());
        final Map<String, Integer> topicCountMap =
                ImmutableMap.of(topic, 1);
        final StringDecoder decoder =
                new StringDecoder(new VerifiableProperties());
        final Map<String, List<KafkaStream<String,String>>>  consumerMap =
                consumer.createMessageStreams(topicCountMap, decoder,  decoder);
        final KafkaStream<String,String> stream =
                consumerMap.get(topic).get(0);
        final ConsumerIterator<String,String> iterator = stream.iterator();
View Full Code Here

TOP

Related Classes of kafka.utils.VerifiableProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.