private static String getPipelineJson() throws Exception { URI uri = Resources.getResource("kafka_destination_pipeline_operations.json").toURI(); String pipelineJson = new String(Files.readAllBytes(Paths.get(uri)), StandardCharsets.UTF_8); pipelineJson = pipelineJson.replace("topicName", TOPIC); pipelineJson = pipelineJson.replaceAll("localhost:9092", KafkaTestUtil.getMetadataBrokerURI()); pipelineJson = pipelineJson.replaceAll("localhost:2181", KafkaTestUtil.getZkServer().connectString()); return pipelineJson; }
@Before @Override public void setUp() throws Exception { super.setUp(); KafkaTestUtil.startZookeeper(); KafkaTestUtil.startKafkaBrokers(3); KafkaTestUtil.createTopic(TOPIC, 3, 2); kafkaStreams = KafkaTestUtil.createKafkaStream(KafkaTestUtil.getZkServer().connectString(), TOPIC, 3); }