kl0u commented on a change in pull request #12288:
URL: https://github.com/apache/flink/pull/12288#discussion_r429818998



##########
File path: 
flink-scala-shell/src/main/java/org/apache/flink/api/java/ScalaShellEnvironment.java
##########
@@ -70,15 +71,12 @@ private static Configuration 
validateAndGetConfiguration(final Configuration con
                return checkNotNull(configuration);
        }
 
-       @Override
-       public JobExecutionResult execute(String jobName) throws Exception {

Review comment:
       Same as below. This would become:
   
   ```
   @Override
        public JobClient executeAsync(String jobName) throws Exception {
                final Configuration configuration = getConfiguration();
                
checkState(configuration.getBoolean(DeploymentOptions.ATTACHED), "Only ATTACHED 
mode is supported by the scala shell.");
   
                final List<URL> updatedJarFiles = getUpdatedJarFiles();
                ConfigUtils.encodeCollectionToConfig(configuration, 
PipelineOptions.JARS, updatedJarFiles, URL::toString);
   
                return super.executeAsync(jobName);
        }
   ```

##########
File path: 
flink-scala-shell/src/main/java/org/apache/flink/api/java/ScalaShellStreamEnvironment.java
##########
@@ -71,19 +72,40 @@ private static Configuration 
validateAndGetConfiguration(final Configuration con
 
        @Override
        public JobExecutionResult execute(StreamGraph streamGraph) throws 
Exception {

Review comment:
       Wouldn't just overriding the `executeAsync` instead of the `execute` 
work? So this would become:
   
   ```
   @Override
        public JobClient executeAsync(StreamGraph streamGraph) throws Exception 
{
                final Configuration configuration = getConfiguration();
                
checkState(configuration.getBoolean(DeploymentOptions.ATTACHED), "Only ATTACHED 
mode is supported by the scala shell.");
   
                final List<URL> updatedJarFiles = getUpdatedJarFiles();
                ConfigUtils.encodeCollectionToConfig(configuration, 
PipelineOptions.JARS, updatedJarFiles, URL::toString);
                return super.executeAsync(streamGraph);
        }
   ```




----------------------------------------------------------------
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]


Reply via email to