Github user tdas commented on a diff in the pull request: https://github.com/apache/spark/pull/20698#discussion_r171732015 --- Diff: external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchReader.scala --- @@ -199,10 +179,10 @@ private[kafka010] class KafkaMicroBatchReader( // Make sure that `KafkaConsumer.poll` is only called in StreamExecutionThread. // Otherwise, interrupting a thread while running `KafkaConsumer.poll` may hang forever // (KAFKA-1894). - assert(Thread.currentThread().isInstanceOf[UninterruptibleThread]) + require(Thread.currentThread().isInstanceOf[UninterruptibleThread]) --- End diff -- not much really. assert throws Assertions and require throws IllegalArgumentException. Just a matter of preference. I can revert this change.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org