Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-27720

ConcurrentModificationException on operating with DirectKafkaInputDStream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 2.4.1, 2.4.3
    • None
    • DStreams
    • None

    Description

      If a DirectKafkaInputDStream is started in one thread and is being stopped in another thread (e.g. by shutdown hook) a java.util.ConcurrentModificationException (KafkaConsumer is not safe for multi-threaded access) is thrown.

      This happens even if "spark.streaming.kafka.consumer.cache.enabled" is set to "false".

      MWE: https://gist.github.com/ov7a/fc783315ea252a03d51804ce326a13b1

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ov7a ov7a
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: