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

Stephan Ewen commented on FLINK-1008:
-------------------------------------

Okay, this is somewhat expected behavior.

Whenever you trigger the plan creation / execution, it works on the part of the 
program so far. After that, all command create a "new plan". It is supposed to 
allow you things like that:

{code}
DataSet<...> stage = env.doSomething();
stage.print();
env.execute();

DataSet<...> stage2 = stage.doSomethingMore();
stage2.writeTo(...);
env.execute();
{code}

When you call {{createPlan()}} you "finish" that part of the program. When you 
then call execute, the second part of the program is empty.

It is debatable, tough, whether {{getExecutionPlan()}} should finalize a 
current stage and start a new one.

> createProgramPlan() throws exception
> ------------------------------------
>
>                 Key: FLINK-1008
>                 URL: https://issues.apache.org/jira/browse/FLINK-1008
>             Project: Flink
>          Issue Type: Bug
>          Components: Java API
>            Reporter: Bastian Köcher
>         Attachments: impro3-ss14-stratosphere.zip
>
>
> After calling createProgramPlan() I get the following exception:
> java.lang.RuntimeException: No data sinks have been created yet. A program 
> needs at least one sink that consumes data. Examples are writing the data set 
> or printing it.
>       at 
> eu.stratosphere.api.java.ExecutionEnvironment.createProgramPlan(ExecutionEnvironment.java:618)
>       at 
> eu.stratosphere.api.java.LocalEnvironment.execute(LocalEnvironment.java:51)
>       at 
> eu.stratosphere.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:516)
> The plan execute and we also have data sinks, so the error is really 
> confusing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to