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

Update the JavaDirectKafkaWordCount example to support the new API of Kafka

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.4.0
    • Component/s: Examples
    • Labels:
      None

      Description

      when I ran the example JavaDirectKafkaWordCount as follows:

      ./bin/spark-submit --class org.apache.spark.examples.streaming.JavaDirectKafkaWordCount --master local --jars /somepath/spark-streaming-kafka-0-10-assembly_2.11-2.3.1.jar examples/jars/spark-examples_2.11-2.3.1.jar kafka-broker:port topic

      Then a error happened: 'org.apache.kafka.common.config.ConfigException:Missing required configuration "bootstrap.servers" which has no default value'. So I looked into the code and found the example JavaDirectKafkaWordCount  misses some kafka required configs.  

        Attachments

          Activity

            People

            • Assignee:
              cluo_dev luochuan
              Reporter:
              cluo_dev luochuan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: