[ https://issues.apache.org/jira/browse/KAFKA-4830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16015474#comment-16015474 ]
ASF GitHub Bot commented on KAFKA-4830: --------------------------------------- GitHub user jedichien opened a pull request: https://github.com/apache/kafka/pull/3085 KAFKA-4830: Augment KStream.print() to allow users pass in extra parameters in the printed string I extend `KStream#print()` to `KStream#print(KeyValueMapper<K, V, String>)`. So I add the following methods : 1. `KStream#print(KeyValueMapper<K, V, String>)` 2. `KStream#print(KeyValueMapper<K, V, String>, String streamName)` 3. `KStream#print(KeyValueMapper<K, V, String>, Serde<K>, Serde<V>)` 4. `KStream#print(KeyValueMapper<K, V, String>, Serde<K>, Serde<V>, String streamName)` You can merge this pull request into a Git repository by running: $ git pull https://github.com/jedichien/kafka KAFKA-4830 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/3085.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 #3085 ---- commit da4bcbaa90ed2107128914f7d6ca92add6e616db Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-04-27T08:00:20Z change connection refused message from level DEBUG into WARN. commit 1adfd44424f2760def0a648c96129243088ef044 Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-02T08:26:04Z replace KeyValuePrinter and KStreamForeach with KStreamPeek commit 407b48b83d3acd8e7803bd32e93aa28e48c446a9 Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-02T10:45:23Z replace KeyValuePrinter and KStreamForeach with KStreamPeek commit 9c3caa19724606e2e8982ea1c63ce8a480945e73 Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-02T10:51:01Z revert commit 80dc9358962c85bf7d369dea5fa5e41965071585 Author: JamesChien <jedich...@users.noreply.github.com> Date: 2017-05-03T01:20:56Z remove unused variable commit 0777963ffc452e69eb468e546c7e4881ecff4cde Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-05T09:01:46Z replace 'KStreamPeek#KStreamPeekProcessor' with PrintForeachAction commit 65eddb227ddc003e71e1e79a2d378014d652566c Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-05T09:03:59Z revert and will open new issue to discuss whether to keep this or not commit 08f37fb99e16c701f293d59d9d12a8f039e9613e Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-05T09:05:00Z Merge branch 'trunk' of https://github.com/jedichien/kafka into trunk replace 'KStreamPeek#KStreamPeekProcessor' with PrintForeachAction commit 3371b13aec71d80e097212820b0beef625948f37 Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-08T10:07:04Z add final and remove unnecessary code commit bfbcced3969701e525d61099999372ff6cbedbd4 Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-08T10:13:50Z add final to local variable commit 62972990a84c4a77c7ca8c3eba6028ddb3f73990 Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-17T01:34:34Z add KStreamPrint to print data message with PrintForeachAction commit 57784600657c71ed4736704bf07af8060e79b74f Author: jameschien <jamesch...@staff.ruten.com.tw> Date: 2017-05-17T01:45:09Z add KStreamPrint to print data message with PrintForeachAction commit 83101ff29ffe52735883e8b71f61176388724229 Author: JamesChien <jedich...@users.noreply.github.com> Date: 2017-05-18T09:14:08Z Augment KStream.print() to allow users pass in extra parameters in the printed string. I extend print() to KStream.print(KeyValueMapper<K, V, String>), KStream.print(KeyValueMapper<K, V, String>, String streamName), KStream.print(KeyValueMapper<K, V, String>, Serde<K>, Serde<V>) and KStream.print(KeyValueMapper<K, V, String>, Serde<K>, Serde<V>, String streamName). ---- > Augment KStream.print() to allow users pass in extra parameters in the > printed string > ------------------------------------------------------------------------------------- > > Key: KAFKA-4830 > URL: https://issues.apache.org/jira/browse/KAFKA-4830 > Project: Kafka > Issue Type: Bug > Components: streams > Reporter: Guozhang Wang > Assignee: james chien > Labels: needs-kip, newbie > > Today {{KStream.print}} use the hard-coded result string as: > {code} > "[" + this.streamName + "]: " + keyToPrint + " , " + valueToPrint > {code} > And some users are asking to augment this so that they can customize the > output string as {{KStream.print(KeyValueMapper<K, V, String>)}} : > {code} > "[" + this.streamName + "]: " + mapper.apply(keyToPrint, valueToPrint) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)