[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16014539#comment-16014539 ] ASF GitHub Bot commented on KAFKA-4772: --- Github user asfgit closed the pull request at: https://github.com/apache/kafka/pull/2955 > 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 >Assignee: james chien >Priority: Minor > Labels: beginner, newbie > Fix For: 0.11.0.0 > > > 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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15992704#comment-15992704 ] james chien commented on KAFKA-4772: my new PR is here https://github.com/apache/kafka/pull/2955 > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15992298#comment-15992298 ] james chien commented on KAFKA-4772: okay, times to resolve this :) :) > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15992286#comment-15992286 ] Matthias J. Sax commented on KAFKA-4772: Please open a new PR. :) > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15991968#comment-15991968 ] james chien commented on KAFKA-4772: Great !! what should I do now? (keep going this comment https://github.com/apache/kafka/pull/2704#issuecomment-294661203 or make a new PR) (I am very excited now :) ) > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15989947#comment-15989947 ] Matthias J. Sax commented on KAFKA-4772: The other PR is old and outdated. It seem the author did abandon it. Thus, we can move on IMHO. > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15989761#comment-15989761 ] james chien commented on KAFKA-4772: okay, I will start to resolve this issue. > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15989741#comment-15989741 ] Matthias J. Sax commented on KAFKA-4772: Exactly. All those classes a quite similar and we can remove redundant code like this. > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15989732#comment-15989732 ] james chien commented on KAFKA-4772: I think I got it, this JIRA is about replacing {`KeyValuePrinter `} and {`KStreamForeach`} with {`KStreamPeek `}, which means wanted to implements like `KStreamImpl#foreach()` with {`KStreamPeek`} but not {`KStreamForeach`}. > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15989231#comment-15989231 ] Matthias J. Sax commented on KAFKA-4772: There is still an issue -- but it's an internal improvement -- we want to remove classes {{KeyValuePrinter}} and {{KStreamForeach}} -- this JIRA is about removing them. > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15989132#comment-15989132 ] james chien commented on KAFKA-4772: As you said, it seems like no issue exists anymore. > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15989106#comment-15989106 ] Matthias J. Sax commented on KAFKA-4772: For {{KStream#peek()}} we don't need a user facing flag, because {{#peek()}} will always send downstream. If you don't want to send anything downstream, you would call `{{KStream#foreach()}}`. > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15988365#comment-15988365 ] james chien commented on KAFKA-4772: I think I know it. This idea is good, and we want to improve KStreamPeek by adding flag to do like KStreamForeach. So, it means we want to do like #peek(flag) to decide whether forwarding the data or not. > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15988188#comment-15988188 ] Matthias J. Sax commented on KAFKA-4772: This JIRA is not about any public API changes (see KAFKA-4830). Any public API change requires a KIP, and we do have a KIP for the other JIRA: https://cwiki.apache.org/confluence/display/KAFKA/KIP-132%3A+Augment+KStream.print+to+allow+extra+parameters+in+the+printed+string This PR is only about internal code refactoring. {{KStreamImpl#print()}} uses {{KeyValuePrinter}} as processor. But with {{#peek()}} we don't need this processor anymore, but can simple call {{#peek()}} with an appropriate UDF. Furthermore, the class {{KStreamForeach}} can be replaced by {{KStreamPeek}} if we add a flag to {{KStreamPeek}} about forwarding the data or not. Does this make sense? > 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 >Assignee: james chien >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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15988025#comment-15988025 ] james chien commented on KAFKA-4772: I want to clarify the problem, as I know is want to do two things. 1. deprecated function "KStream.print()" due to we have "peak()". 2. add flag in "peak()" to let user decide whether data still be forwarded or not (eg. peak(xxx, true) or peak(xxx, false) ) > 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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15972048#comment-15972048 ] Matthias J. Sax commented on KAFKA-4772: As you can see, there is already a PR for this... Not sure why the JIRA got not assigned. I'll double check an put a comment on the PR. I cannot add you, as I am not a committer. Please send an email to dev list and provide your JIRA ID. > 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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15971906#comment-15971906 ] Raul Estrada commented on KAFKA-4772: - Hello [~mjsax] could you add me to the contributor list to help you? Thanks > 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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15931229#comment-15931229 ] ASF GitHub Bot commented on KAFKA-4772: --- GitHub user backender opened a pull request: https://github.com/apache/kafka/pull/2704 KAFKA-4772: [WIP] Use KStreamPeek to replace KeyValuePrinter **Alternative to: https://github.com/apache/kafka/pull/2703 and serves as a reference for discussion.** Tackles [KAFKA-4772](https://issues.apache.org/jira/browse/KAFKA-4772) and was previously discussed in https://github.com/apache/kafka/pull/2669 This PR contains only a slight improvement over the current `KeyValuePrinter`. The main functionaliy of the printer was refactored such that ForeachAction can be used. This would allow to further refactor KeyValuePrinter as soon as ForeachAction accepts a ProcessorContext as an argument, which is required to retrieve the topic name. You can merge this pull request into a Git repository by running: $ git pull https://github.com/delftswa2017/kafka fix-KAFKA-4772 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/2704.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 #2704 commit 4963d01a4670d8907d5d7453ccf244da94cc4a2c Author: Marc JuchliDate: 2017-03-18T12:22:41Z Use KStreamPeek to implement KeyValuePrinter This PR contains only a slight improvement over the current KeyValuePrinter. The main functionaliy of the printer was refactored such that ForeachAction is being used. This would allow to further refactor KeyValuePrinter as soon as ForeachAction accepts a ProcessorContext as an argument. > 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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15931227#comment-15931227 ] ASF GitHub Bot commented on KAFKA-4772: --- GitHub user backender opened a pull request: https://github.com/apache/kafka/pull/2703 KAFKA-4772: Use peek to implement print **Tackles [KAFKA-4772](https://issues.apache.org/jira/browse/KAFKA-4772) and was previously discussed in https://github.com/apache/kafka/pull/2669** The functionality of `KeyValuePrinter` is replaced with `PrintAction` which implements `ForeachAction` and can be passed to `KStreamPeek`. We therefore can get rid of `KeyValuePrinter`. My only concern is that `ForeachAction` does not have access to the `ProcessorContext`, which means, that the topic name cannot be used within the deserialization process. For now, the a null value is filled in as a placeholder for topic. You can merge this pull request into a Git repository by running: $ git pull https://github.com/delftswa2017/kafka fix-KAFKA-4772-notopic Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/2703.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 #2703 commit 46d5f20eb1ee69abc24b05f890eca620d2399b17 Author: Marc JuchliDate: 2017-03-18T14:00:59Z Use peek to implement print The functionaliy of KeyValuePrinter is replaced with PrintAction which implements ForeachAction and can be passed to KStreamPeek. We therefore can get rid of KeyValuePrinter. My only concern is that ForeachAction does not have access to the ProcessorContext, which means, that the topic name cannot be used within the deserialization process. For now, the a null value is filled in as a placeholder for topic. > 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)
[jira] [Commented] (KAFKA-4772) Exploit #peek to implement #print() and other methods
[ https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 JuchliDate: 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)