Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-287

FlinkInterpreter does not properly captures standard output

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.5.5
    • None
    • None

    Description

      The FlinkInterpreter does not properly captures the standard output when using System.out.println. The reason is that Zeppelin only sets the redirection for the Console which is used by Scala's Predef imports of print and println. However, some of Flink's code is written in Java and, thus, uses System.out for standard output. This output won't be captured.

      The problem can be observed by executing the following code

      val input = env.fromElements("a", "b", "c")
      input.print()
      

      This code should output "a\nb\nc" or another permutation of a,b and c. However, nothing is printed. The current way for solving the problem is to manually collect the DataSet and to print it with Console.println. E.g.

      val input = env.fromElements("a", "b", "c")
      input.collect().foreach{println}
      

      I propose to change the behaviour of Zeppelin's Flink interpreter to properly capture all standard output to avoid these workarounds.

      Attachments

        Activity

          People

            trohrmann Till Rohrmann
            trohrmann Till Rohrmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: