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

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

GitHub user bbejeck opened a pull request:

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

    KAFKA-3338 [WIP]: Add print and writeAsText to KStream and KTable interfaces

    This is the first pass at implementing the print and writeAsText 
functionality for KStream and KTable.  I have some uncertainty on how Serde 
instances are handled here.
    
    This contribution is my original work and I license this contribution to 
Apache-Kafka.

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

    $ git pull https://github.com/bbejeck/kafka 
KAFKA-3338-Add-print-writeAsText-to-Streams-DSL

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

    https://github.com/apache/kafka/pull/1187.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 #1187
    
----
commit 263891d4c86ec049f8848e47f56212fd36a12539
Author: bbejeck <bbej...@gmail.com>
Date:   2016-04-05T02:44:49Z

    KAFKA-3338: Initial pass at implementing print/writeAsText functionality 
for KStream and KTable.

----


> Add print and writeAsText functions to the Streams DSL
> ------------------------------------------------------
>
>                 Key: KAFKA-3338
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3338
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: kafka streams
>            Reporter: Guozhang Wang
>            Assignee: Bill Bejeck
>              Labels: newbie++
>             Fix For: 0.10.1.0
>
>
> We want to provide some REPL-like pattern for users for better debuggability. 
> More concretely, we want to allow users to easily inspect their intermediate 
> data streams in the topology while running the application. Theoretically 
> this can be done by using a break point, or by calling System.out.println() 
> inside the operator, or through a finer grained trace-level logging. But more 
> user-friendly API would be to add a print() function to the KStream / KTable 
> object like:
> {code}
> // Prints the elements in this stream to the stdout, i.e. "System.out" of the 
> JVM
> KStream#print(/* optional serde */);  
> KTable#print(/* optional serde */);  
> // Writes the stream as text file(s) to the specified location.
> KStream#writeAsText(String filePath, /* optional serde */);
> KTable#writeAsText(String filePath, /* optional serde */);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to