Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21488#discussion_r203109788
  
    --- Diff: 
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaOffsetReader.scala
 ---
    @@ -115,7 +116,7 @@ private[kafka010] class KafkaOffsetReader(
       def fetchTopicPartitions(): Set[TopicPartition] = runUninterruptibly {
         assert(Thread.currentThread().isInstanceOf[UninterruptibleThread])
         // Poll to get the latest assigned partitions
    -    consumer.poll(0)
    +    consumer.poll(JDuration.ofMillis(0))
    --- End diff --
    
    @tedyu just realized this is `ofMillis` rather than `toMillis`. We 
definitely cannot use it as this `poll` overload doesn't exist in previous 
versions and we want to support Kafka versions from 0.10 to 2.0.


---

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

Reply via email to