spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ijuma <...@git.apache.org>
Subject [GitHub] spark pull request #21488: SPARK-18057 Update structured streaming kafka fro...
Date Sun, 03 Jun 2018 21:16:19 GMT
Github user ijuma commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21488#discussion_r192602632
  
    --- Diff: external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaTestUtils.scala
---
    @@ -96,10 +101,13 @@ class KafkaTestUtils(withBrokerProps: Map[String, Object] = Map.empty)
extends L
       // Set up the Embedded Zookeeper server and get the proper Zookeeper port
       private def setupEmbeddedZookeeper(): Unit = {
         // Zookeeper server startup
    -    zookeeper = new EmbeddedZookeeper(s"$zkHost:$zkPort")
    +    val zkSvr = s"$zkHost:$zkPort";
    +    zookeeper = new EmbeddedZookeeper(zkSvr)
         // Get the actual zookeeper binding port
         zkPort = zookeeper.actualPort
    -    zkUtils = ZkUtils(s"$zkHost:$zkPort", zkSessionTimeout, zkConnectionTimeout, false)
    +    zkUtils = ZkUtils(zkSvr, zkSessionTimeout, zkConnectionTimeout, false)
    +    zkClient = KafkaZkClient(zkSvr, false, 6000, 10000, Int.MaxValue, Time.SYSTEM)
    +    adminZkClient = new AdminZkClient(zkClient)
    --- End diff --
    
    AdminClient.create gives you a concrete instance. createPartitions is the method you're
looking for.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message