[jira] [Comment Edited] (KAFKA-4830) Augment KStream.print() to allow users pass in extra parameters in the printed string
[ https://issues.apache.org/jira/browse/KAFKA-4830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16015110#comment-16015110 ] james chien edited comment on KAFKA-4830 at 5/18/17 2:41 AM: - I think if we do that then we will introduce a new API called `{KStream#print(KeyValueMapper)}`. was (Author: james.c): I think if we do that then we will introduce a new API called ```KStream#print(KeyValueMapper)```. > 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)}} : > {code} > "[" + this.streamName + "]: " + mapper.apply(keyToPrint, valueToPrint) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (KAFKA-4830) Augment KStream.print() to allow users pass in extra parameters in the printed string
[ https://issues.apache.org/jira/browse/KAFKA-4830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16015110#comment-16015110 ] james chien edited comment on KAFKA-4830 at 5/18/17 2:41 AM: - I think if we do that then we will introduce a new API called {{KStream#print(KeyValueMapper)}}. was (Author: james.c): I think if we do that then we will introduce a new API called `{KStream#print(KeyValueMapper)}`. > 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)}} : > {code} > "[" + this.streamName + "]: " + mapper.apply(keyToPrint, valueToPrint) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (KAFKA-4830) Augment KStream.print() to allow users pass in extra parameters in the printed string
[ https://issues.apache.org/jira/browse/KAFKA-4830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16015110#comment-16015110 ] james chien edited comment on KAFKA-4830 at 5/18/17 2:40 AM: - I think if we do that then we will introduce a new API called ```KStream#print(KeyValueMapper)```. was (Author: james.c): I think if we do that then we will introduce a new API called `KStream#print(KeyValueMapper)`. > 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)}} : > {code} > "[" + this.streamName + "]: " + mapper.apply(keyToPrint, valueToPrint) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (KAFKA-4830) Augment KStream.print() to allow users pass in extra parameters in the printed string
[ https://issues.apache.org/jira/browse/KAFKA-4830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986208#comment-15986208 ] james chien edited comment on KAFKA-4830 at 4/27/17 8:51 AM: - the issue still exists? if not can I try it ? was (Author: james.c): the issue still exists? > 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 > 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)}} : > {code} > "[" + this.streamName + "]: " + mapper.apply(keyToPrint, valueToPrint) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (KAFKA-4830) Augment KStream.print() to allow users pass in extra parameters in the printed string
[ https://issues.apache.org/jira/browse/KAFKA-4830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15894483#comment-15894483 ] Marc Juchli edited comment on KAFKA-4830 at 3/3/17 3:18 PM: I'd like to tackle this, but beforehand I have a question. I see that your mentioned line of code is part of {{KeyValuePrinter}}, and now I am unsure whether this was just an example. If my understanding is correct, what was suggested with {{KStream.print(KeyValueMapper)}} is meant to be an extension of {{KStream}} in order to let the user decide how the output of the K,V shall look like. However, this rises my concerns as we wouldn't allow to set a {{streamName}} with this function definition. Therefore, my approach would be to extend KStream with {{void print(final Serde keySerde, final Serde valSerde, final String streamName, final KeyValueMapper mapper)}}. Furthermore, as {{KStreamImpl.print}} creates an instance of {{KeyValuePrinter}}, this class would have to be changed too accordingly. Or is that meant be left open to the user? was (Author: mjuchli): I'd like to tackle this, but beforehand I have a question. I see that your mentioned line of code is part of {{KeyValuePrinter}}, and now I am unsure whether this was just an example. If my understanding is correct, what was suggested with {{KStream.print(KeyValueMapper)}} is meant to be an extension of {{KStream}} in order to let the user decide how the output of the K,V shall look like. However, this rises my concerns as we wouldn't allow to set a {{streamName}} with this function definition. Therefore, my approach would be to extend KStream with {{void print(final String streamName, final KeyValueMapper mapper)}}. Furthermore, as {{KStreamImpl.print}} creates an instance of {{KeyValuePrinter}}, this class would have to be changed too accordingly. Or is that meant be left open to the user? > 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 > Labels: 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): > {code} > "[" + this.streamName + "]: " + mapper.apply(keyToPrint, valueToPrint) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (KAFKA-4830) Augment KStream.print() to allow users pass in extra parameters in the printed string
[ https://issues.apache.org/jira/browse/KAFKA-4830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15894483#comment-15894483 ] Marc Juchli edited comment on KAFKA-4830 at 3/3/17 2:41 PM: I'd like to tackle this, but beforehand I have a question. I see that your mentioned line of code is part of {{KeyValuePrinter}}, and now I am unsure whether this was just an example. If my understanding is correct, what was suggested with {{KStream.print(KeyValueMapper)}} is meant to be an extension of {{KStream}} in order to let the user decide how the output of the K,V shall look like. However, this rises my concerns as we wouldn't allow to set a {{streamName}} with this function definition. Therefore, my approach would be to extend KStream with {{void print(final String streamName, final KeyValueMapper mapper)}}. Furthermore, as {{KStreamImpl.print}} creates an instance of {{KeyValuePrinter}}, this class would have to be changed too accordingly. Or is that meant be left open to the user? was (Author: mjuchli): I'd like to tackle this, but beforehand I have a question. I see that your mentioned line of code is part of {{KeyValuePrinter}}, and now I am unsure whether this was just an example. If my understanding is correct, what was suggested with {{KStream.print(KeyValueMapper)}} is meant to be an extension of {{KStream}} in order to let the user decide how the output of the K,V shall look like. However, this rises my concerns as we wouldn't allow to set a {{streamName}} with this function definition. Therefore, my approach would be to extend KStream with {{void print(final String streamName, final KeyValueMapper mapper)}}. Furthermore, as {{KStreamImpl.print}} creates an instance of `KeyValuePrinter`, this class would have to be changed too accordingly. Or is that meant be left open to the user? > 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 > Labels: 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): > {code} > "[" + this.streamName + "]: " + mapper.apply(keyToPrint, valueToPrint) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)