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

Fix bug: init SimpleConsumerConfig with kafka params

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.2, 1.4.2, 1.5.0
    • Component/s: DStreams
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: