[ 
https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15905184#comment-15905184
 ] 

ASF GitHub Bot commented on KAFKA-4772:
---------------------------------------

GitHub user backender opened a pull request:

    https://github.com/apache/kafka/pull/2669

    KAFKA-4772: [WIP] Use peek to implement print

    **PROPOSAL/DISCUSSION FOR KIP-132.**
    Tackles [KAFKA-4772](https://issues.apache.org/jira/browse/KAFKA-4772) and 
[KAFKA-4830](https://issues.apache.org/jira/browse/KAFKA-4830).
    
    The functionaliy of KeyValuePrinter is replaced with a printAction that
    is being passed to KStreamPeek. We therefore can get rid of
    KeyValuePrinter.
    
    KStream.print was extended to handle KeyValueMapper in order to provide
    users the option to change output of K and V. Therefore, constructors of
    KeyValuePrinter as well as KeyValuePrinterProcessor have to be adapted. The 
default case
    where no mapper will be passed, is still covered by the previous comma
    separated out of K, V.

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

    $ git pull https://github.com/delftswa2017/kafka fix-kafka-4772-4830

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

    https://github.com/apache/kafka/pull/2669.patch

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

    This closes #2669
    
----
commit cfa86a243c0d0785ff00bfe9fc3950180406c65f
Author: Marc Juchli <m...@marcjuch.li>
Date:   2017-03-10T14:28:04Z

    Use peek to implement print
    
    The functionaliy of KeyValuePrinter is replaced with a printAction that
    is being passed to KStreamPeek. We therefore can get rid of
    KeyValuePrinter.
    
    KStream.print was extended to handle KeyValueMapper in order to provide
    users the option to change output of K and V. Therefore, constructors of
    KeyValuePrinter as well as KeyValuePrinterProcessor have to be adapted. The 
default case
    where no mapper will be passed, is still covered by the previous comma
    separated out of K, V.

----


> Exploit #peek to implement #print() and other methods
> -----------------------------------------------------
>
>                 Key: KAFKA-4772
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4772
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: Matthias J. Sax
>            Priority: Minor
>              Labels: beginner, newbie
>
> From: https://github.com/apache/kafka/pull/2493#pullrequestreview-22157555
> Things that I can think of:
> - print / writeAsTest can be a special impl of peek; KStreamPrint etc can be 
> removed.
> - consider collapse KStreamPeek with KStreamForeach with a flag parameter 
> indicating if the acted key-value pair should still be forwarded.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to