[
https://issues.apache.org/jira/browse/FLINK-2249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15011112#comment-15011112
]
ASF GitHub Bot commented on FLINK-2249:
---------------------------------------
Github user mxm commented on the pull request:
https://github.com/apache/flink/pull/1375#issuecomment-157736688
From what I've seen so far, users are very puzzled about execute() after
collect(). This was even more of a problem because we once had this in our
quickstart examples. Initially, I was convinced ignoring `execute()` after
`collect()` would be a good solution. On second thought, it creates new
problems like users wondering why their program doesn't do anything..
So +1 for closing the issue.
> ExecutionEnvironment: Ignore calls to execute() if no data sinks defined
> ------------------------------------------------------------------------
>
> Key: FLINK-2249
> URL: https://issues.apache.org/jira/browse/FLINK-2249
> Project: Flink
> Issue Type: Improvement
> Components: Java API, Scala API
> Affects Versions: 0.9
> Reporter: Maximilian Michels
> Assignee: Chesnay Schepler
>
> The basic skeleton of a Flink program looks like this:
> {code}
> 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()
> {code}
> 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."
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)