mxm commented on a change in pull request #7249: [FLINK-11048] Ability to 
programmatically execute streaming pipeline with savepoint restore
URL: https://github.com/apache/flink/pull/7249#discussion_r239501341
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/RemoteStreamEnvironment.java
 ##########
 @@ -169,39 +170,46 @@ public RemoteStreamEnvironment(String host, int port, 
Configuration clientConfig
                }
        }
 
-       @Override
-       public JobExecutionResult execute(String jobName) throws 
ProgramInvocationException {
-               StreamGraph streamGraph = getStreamGraph();
-               streamGraph.setJobName(jobName);
-               transformations.clear();
-               return executeRemotely(streamGraph, jarFiles);
+       protected List<URL> getJarFiles() throws ProgramInvocationException {
+               return jarFiles;
        }
 
        /**
         * Executes the remote job.
         *
-        * @param streamGraph
-        *            Stream Graph to execute
+        * @param streamExecutionEnvironment
+        *            Execution Environment with Stream Graph to execute
         * @param jarFiles
         *                        List of jar file URLs to ship to the cluster
         * @return The result of the job execution, containing elapsed time and 
accumulators.
         */
-       protected JobExecutionResult executeRemotely(StreamGraph streamGraph, 
List<URL> jarFiles) throws ProgramInvocationException {
+       public static JobExecutionResult 
executeRemotely(StreamExecutionEnvironment streamExecutionEnvironment,
 
 Review comment:
   StreamGraph is exposed anyway because there is 
`StreamExecutionEnvironment.getStreamGraph()` though I see it is marked 
`@Internal`. I'm fine also with passing the environment.
   
   >IMO any use-case where usage of the StreamGraph is appropriate (for which 
tbh there are none as the JobGraph would be a better choice anyway) is already 
a pretty low-level thing in which case you can work directly against a 
ClusterClient.
   
   So you are suggesting to move the code here to `ClusterClient`? I think that 
would make sense.
   
   
   

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


With regards,
Apache Git Services

Reply via email to