%md ##Setup Sets up a Kafka cluster, with single partition topics "input1", "intput2".
Sets up a Kafka cluster, with single partition topics "input1", "intput2".
%run ./utils
import sys.process._ val kafkaCluster = com.databricks.spark.LocalKafka.setup(spark, stopSparkOnKafkaNodes = false, numKafkaNodes = 1)
// Capture the output to avoid cluttering things. Console.withOut(new java.io.ByteArrayOutputStream) { kafkaCluster.deleteTopicIfExists("input1") kafkaCluster.deleteTopicIfExists("input2") kafkaCluster.createTopic("input1", 1) kafkaCluster.createTopic("input2", 1) }
Setup
Sets up a Kafka cluster, with single partition topics "input1", "intput2".
Last refresh: Never