GitHub user zhangxinyu1 opened a pull request:

    Add KafkaForeachWriter in external kafka-0.8.0 for structured streaming 

    ## What changes were proposed in this pull request?
    I propose a `KafkaForeachWriter.scala` in external kafka-0.8.0. 
    It's useful for someone who requires to write results to kafka in 
structured streaming module. It can be used with `ForeachSink`, and the usage 
is as below: 
     `val query = input.writeStream`
                       `.foreach(new KafkaForeachWriter[Row](producerProps, 
topics, input.schema)`
    ## How was this patch tested?
    Unit test in `KafkaForeachWriterSuite.scala`

You can merge this pull request into a Git repository by running:

    $ git pull 

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15483
commit 8c2022755c08828edea3ef61f35a8490d1d6af24
Author: zhangxinyu1 <>
Date:   2016-10-11T09:15:09Z

    add KafkaForeachWriter for structured streaming. It can be used with 

commit 1ad774919598aca5cf126c2c6e19fa618eaaa5d1
Author: zhangxinyu1 <>
Date:   2016-10-14T10:29:33Z

    Add KafkaForeachWriter to write result to kafka in structured streaming
    It can be used with ForeachSink


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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to