Package com.netflix.suro.sink.kafka

Examples of com.netflix.suro.sink.kafka.KafkaSink


                "    \"metadata.broker.list\": \"" + brokerList + "\",\n" +
                "    \"request.required.acks\": 1\n" +
                "}";

        jsonMapper.registerSubtypes(new NamedType(KafkaSink.class, "kafka"));
        KafkaSink sink = jsonMapper.readValue(description, new TypeReference<Sink>(){});
        sink.open();
        Iterator<Message> msgIterator = new MessageSetReader(TestKafkaSink.createMessageSet(topicName, 2)).iterator();
        while (msgIterator.hasNext()) {
            sink.writeTo(new StringMessage(msgIterator.next()));
        }
        sink.close();
    }
View Full Code Here


                        "--zookeeper", "dummy", "--create", "--topic", TOPIC_NAME,
                        "--replication-factor", "2", "--partitions", "1"}));

        final ObjectMapper jsonMapper = new DefaultObjectMapper();

        final KafkaSink kafkaSink = createKafkaProducer(jsonMapper, kafkaServer.getBrokerListStr());

        Client client = createMockedESClient();

        final ElasticSearchSink sink = new ElasticSearchSink(
                null,
View Full Code Here

                "    \"metadata.broker.list\": \"" + brokerListStr + "\",\n" +
                "    \"request.required.acks\": 1\n" +
                "}";

        jsonMapper.registerSubtypes(new NamedType(KafkaSink.class, "kafka"));
        final KafkaSink kafkaSink = jsonMapper.readValue(description, new TypeReference<Sink>(){});
        kafkaSink.open();
        return kafkaSink;
    }
View Full Code Here

TOP

Related Classes of com.netflix.suro.sink.kafka.KafkaSink

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.