You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink Jira Bot (Jira)" <ji...@apache.org> on 2022/04/07 10:43:00 UTC

[jira] [Updated] (FLINK-23158) Source transformation is not added to the StreamExecutionEnvironment explicitly

     [ 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 pull-request-available stale-minor  (was: auto-deprioritized-major pull-request-available)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issues has been marked as Minor but is unassigned and neither itself nor its Sub-Tasks have been updated for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is still Minor, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized.


> 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: Minor
>              Labels: auto-deprioritized-major, pull-request-available, stale-minor
>
> 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)