Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-2249

ExecutionEnvironment: Ignore calls to execute() if no data sinks defined

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 0.9
    • None
    • API / Scala
    • None

    Description

      The basic skeleton of a Flink program looks like this:

      ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      
      // bootstrap DataSet
      DataSet<..> ds = env.fromElements(1,2,3,4);
      // perform transformations
      ..
      // define sinks, e.g.
      ds.writeToTextFile("/some/path");
      // execute
      env.execute()
      

      First thing users do is to change ds.writeToTextFile("/some/path"); into ds.print();. But that fails with an Exception ("No new data sinks defined...").

      In FLINK-2026 we made this exception message easier to understand. However, users still don't understand what is happening. Especially because they see Flink executing and then failing.

      I propose to ignore calls to execute() when no sinks are defined. Instead, we should just print a warning: "Detected call to execute without any data sinks. Not executing."

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            chesnay Chesnay Schepler
            mxm Maximilian Michels
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment