[
https://issues.apache.org/jira/browse/KAFKA-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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 Juchli <[email protected]>
Date: 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)