You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/11/18 12:14:10 UTC

[jira] [Commented] (FLINK-2249) ExecutionEnvironment: Ignore calls to execute() if no data sinks defined

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

ASF GitHub Bot commented on FLINK-2249:
---------------------------------------

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/1375

    [FLINK-2249] Ignore calls to execute without sinks

    This PR makes the following changes:
    * DataSet actions store the last jobExecutionResult in the environment
    * Environment.execute() ...
     * fails, if no sinks is defined with an InvalidProgramException,
     * returns the last result and prints a warning, if no sink was defined since the last execution,
     * executes as usual if a sink was defined since the last execution.

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

    $ git pull https://github.com/zentol/flink 2249_ignoreExecute

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

    https://github.com/apache/flink/pull/1375.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 #1375
    
----
commit c0dde401f7931657cb072d00ab2b73f3b239f9da
Author: zentol <ch...@apache.org>
Date:   2015-11-18T10:44:37Z

    [FLINK-2249] Ignore calls to execute without sinks

----


> 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)