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

Fix bug: init SimpleConsumerConfig with kafka params

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.3.2, 1.4.2, 1.5.0
    • DStreams
    • None

    Description

      "zookeeper.connect" and "group.id" aren't necessary for anything in the kafka direct stream.

      But they're expected to be present in a kafka consumer config, and overriding that behavior wasn't possible. So as a workaround, we set them to a blank string. That way users don't have to define unnecessary settings in the kafka param map passed to the KafkaUtils constructor. We talked through that during the original development of the direct stream.

      The code as it is released today is almost always going to set a blank string, regardless of what users pass in, because contains on a java property object is not the equivalent of containsKey, it is containsValue. The intention was that if the user sets those properties (whatever personal reasons they have), the values should not get overwritten with a blank string.

      Attachments

        Activity

          People

            guowei2 guowei
            guowei2 guowei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: