You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Petr Novotnik (JIRA)" <ji...@apache.org> on 2017/04/11 16:06:42 UTC

[jira] [Created] (FLINK-6296) Retrieving execution plan fails succeeding execution attempt

Petr Novotnik created FLINK-6296:
------------------------------------

             Summary: Retrieving execution plan fails succeeding execution attempt
                 Key: FLINK-6296
                 URL: https://issues.apache.org/jira/browse/FLINK-6296
             Project: Flink
          Issue Type: Bug
          Components: DataSet API, Job-Submission, YARN
    Affects Versions: 1.2.0
            Reporter: Petr Novotnik


Hello,

calling {{ExecutionEnvironment#getExecutionPlan()}} prior to {{ExecutionEnvironment#execute()}} makes the later fail with the following message if I try to run my job on yarn, i.e. {{flink run -m yarn-cluster ...}}:

{noformat}
> Caused by: java.lang.RuntimeException: No new data sinks have been defined since the last execution. The last execution refers to the latest call to 'execute()', 'count()', 'collect()', or 'print()'.
> 	at org.apache.flink.api.java.ExecutionEnvironment.createProgramPlan(ExecutionEnvironment.java:1050)
> 	at org.apache.flink.api.java.ExecutionEnvironment.createProgramPlan(ExecutionEnvironment.java:1032)
> 	at org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:59)
> 	at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:926)
{noformat}

It works fine when executing the job locally (and it works fine locally or even on yarn using the DataStream API, i.e. {{StreamExecutionEnvironment}}). 

So far I could track it down, the problem seems the "clearing" behaviour of {{ContextEnvironment#createProgramPlan(..)}}. This makes me wonder why {{#getExecutionPlan}} uses the one parameter version of {{#createProgramPlan(..)}}. Is "clearing" the sinks really required as part of {{getExecutionPlan()}}?

I just check, in Flink 1.1.5, {{#getExecutionPlan(..)}} invokes {{#createProgramPlan("unnamed job", false)}}, hence, it would be good to document as a breaking change [in the migration guide|https://ci.apache.org/projects/flink/flink-docs-release-1.2/ops/upgrading.html] since the resulting error message is rather misleading.
P.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)