Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2590 KIP-28: Kafka Streams Checklist
  3. KAFKA-3338

Add print and writeAsText functions to the Streams DSL

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0.0
    • 0.10.0.0
    • streams

    Description

      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:

      // 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 */);
      
      

      Attachments

        Issue Links

          Activity

            People

              bbejeck Bill Bejeck
              guozhang Guozhang Wang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: