[ 
https://issues.apache.org/jira/browse/FLINK-23158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flink Jira Bot updated FLINK-23158:
-----------------------------------
      Labels: auto-deprioritized-major auto-deprioritized-minor 
pull-request-available  (was: auto-deprioritized-major pull-request-available 
stale-minor)
    Priority: Not a Priority  (was: Minor)

This issue was labeled "stale-minor" 7 days ago and has not received any 
updates so it is being deprioritized. If this ticket is actually Minor, please 
raise the priority and ask a committer to assign you the issue or revive the 
public discussion.


> Source transformation is not added to the StreamExecutionEnvironment 
> explicitly
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-23158
>                 URL: https://issues.apache.org/jira/browse/FLINK-23158
>             Project: Flink
>          Issue Type: Bug
>          Components: API / DataStream
>    Affects Versions: 1.14.0
>            Reporter: Yun Gao
>            Priority: Not a Priority
>              Labels: auto-deprioritized-major, auto-deprioritized-minor, 
> pull-request-available
>
> Currently for the implementation of `StreamExecutionEnvironment#fromSource()` 
> and `StreamExecutionEnvironment#addSource()`, the SourceTransformation is not 
> added to the transformation list explicitly, this make the job with a single 
> source could not run directly. For example, 
> {code:java}
> StreamExecutionEnvironment env = 
> StreamExecutionEnvironment.getExecutionEnvironment();
>               env.addSource(new SourceFunction<String>() {
>                       @Override
>                       public void run(SourceContext<String> sourceContext) 
> throws Exception {
>                       }
>                       @Override
>                       public void cancel() {
>                       }
>               });
>               env.execute();
> {code}
> would throws the exception:
> {code:java}
> Exception in thread "main" java.lang.IllegalStateException: No operators 
> defined in streaming topology. Cannot execute.
>       at 
> org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.getStreamGraphGenerator(StreamExecutionEnvironment.java:2019)
>       at 
> org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.getStreamGraph(StreamExecutionEnvironment.java:2010)
>       at 
> org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.getStreamGraph(StreamExecutionEnvironment.java:1995)
>       at 
> org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1834)
>       at 
> org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1817)
>       at test.SingleSourceTest.main(SingleSourceTest.java:41)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to