Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14416#discussion_r72882929
  
    --- Diff: 
external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/KafkaTestUtils.scala
 ---
    @@ -178,8 +178,9 @@ private[kafka010] class KafkaTestUtils extends Logging {
     
       /** Send the array of messages to the Kafka broker */
       def sendMessages(topic: String, messages: Array[String]): Unit = {
    -    producer = new Producer[String, String](new 
ProducerConfig(producerConfiguration))
    -    producer.send(messages.map { new KeyedMessage[String, String](topic, _ 
) }: _*)
    +    producer = new KafkaProducer[String, String](producerConfiguration)
    +    val records = messages.map { new ProducerRecord[String, String](topic, 
_) }
    +    records.map(producer.send)
    --- End diff --
    
    Oh, thank you.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to