You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/10 08:06:51 UTC

[GitHub] [flink] wuchong commented on a change in pull request #10501: [FLINK-15139][table sql / client]misc end to end test failed cause loss jars in converting to jobgraph

wuchong commented on a change in pull request #10501: [FLINK-15139][table sql / client]misc end to end test failed  cause loss jars in converting to jobgraph
URL: https://github.com/apache/flink/pull/10501#discussion_r355889660
 
 

 ##########
 File path: flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/local/ExecutionContext.java
 ##########
 @@ -310,6 +316,14 @@ private static Configuration createExecutionConfig(
 		Configuration executionConfig = activeCommandLine.applyCommandLineOptionsToConfiguration(
 				commandLine);
 
+		try {
+			final ProgramOptions programOptions = new ProgramOptions(commandLine);
+			final ExecutionConfigAccessor executionConfigAccessor = ExecutionConfigAccessor.fromProgramOptions(programOptions, dependencies);
+			ConfigUtils.encodeCollectionToConfig(executionConfig, PipelineOptions.JARS, executionConfigAccessor.getJars(), URL::toString);
+		} catch (CliArgsException e) {
+			throw new SqlExecutionException("Invalid deployment run options.", e);
+		}
 
 Review comment:
   You can simplify this into one line:
   
   ```java
   		ConfigUtils.encodeCollectionToConfig(
   			executionConfig,
   			PipelineOptions.JARS,
   			dependencies,
   			URL::toString);
   ```
   
   We don't need to parse `commandLine` again here.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services