Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/1480#discussion_r48659202
--- Diff:
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStream.scala
---
@@ -44,7 +44,14 @@ class DataStream[T](javaStream: JavaStream[T]) {
/**
* Gets the underlying java DataStream object.
*/
- def getJavaStream: JavaStream[T] = javaStream
+ private[flink] def getJavaStream: JavaStream[T] = javaStream
+
+ /**
+ * Returns the [[StreamExecutionEnvironment]] associated with the
current [[DataStream]].
+ * @return associated execution environment
+ */
+ def getExecutionEnvironment: StreamExecutionEnvironment =
+ new StreamExecutionEnvironment(javaStream.getExecutionEnvironment)
--- End diff --
I think creating a new environment can lead to problems. The proper
`StreamExecutionEnvironment`should be stored in the java stream and retrieved
here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---