[
https://issues.apache.org/jira/browse/FLINK-23158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-23158:
-----------------------------------
Labels: pull-request-available stale-major (was: 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
Major but is unassigned and neither itself nor its Sub-Tasks have been updated
for 60 days. I have gone ahead and added a "stale-major" to the issue". If this
ticket is a Major, 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: Major
> Labels: pull-request-available, stale-major
>
> 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.3.4#803005)