Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.3.2
-
None
Description
The assert
assert(Thread.currentThread().isInstanceOf[UninterruptibleThread])
is not needed. The reason is the following
- This assert was put there due to some issues when the old and deprecated KafkaOffsetReaderConsumer is used. The default offset reader implementation has been changed to KafkaOffsetReaderAdmin which no longer require it run via UninterruptedThread.
- Even if the deprecated KafkaOffsetReaderConsumer is used, there are already asserts in that impl to check if it is running via UninterruptedThread e.g. https://github.com/apache/spark/blob/master/connector/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaOffsetReaderConsumer.scala#L130 thus the assert in KafkaMicroBatchStream is redundant.