danny0405 commented on a change in pull request #10491: 
[FLINK-15093][streaming-java] StreamExecutionEnvironment does not cle…
URL: https://github.com/apache/flink/pull/10491#discussion_r355420532
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
 ##########
 @@ -1713,7 +1713,23 @@ public StreamGraph getStreamGraph() {
         */
        @Internal
        public StreamGraph getStreamGraph(String jobName) {
-               return getStreamGraphGenerator().setJobName(jobName).generate();
+               return getStreamGraph(jobName, true);
+       }
+
+       /**
+        * Getter of the {@link 
org.apache.flink.streaming.api.graph.StreamGraph} of the streaming job.
+        *
+        * @param jobName Desired name of the job
+        * @param clearTransformations Whether or not to start a new stage of 
execution
+        * @return The streamgraph representing the transformations
+        */
+       @Internal
+       public StreamGraph getStreamGraph(String jobName, boolean 
clearTransformations) {
 
 Review comment:
   The `getExecutionPlan()` invoke `getStreamGraph()` directly, if we found 
that for most of the user cases, we do not need to keep those transformations, 
i'm inclined to remove the transformations also for `getExecutionPlan()`, this 
would make these `getXXX` interfaces synced with removing transformations 
logic. Also make it not that confusing.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to