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/10/23 08:55:18 UTC

[GitHub] [flink] TisonKun commented on a change in pull request #9974: [FLINK-14501][FLINK-14502] Decouple ClusterDescriptor/ClusterSpecification from CommandLine

TisonKun commented on a change in pull request #9974: [FLINK-14501][FLINK-14502] Decouple ClusterDescriptor/ClusterSpecification from CommandLine
URL: https://github.com/apache/flink/pull/9974#discussion_r337925056
 
 

 ##########
 File path: flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java
 ##########
 @@ -194,24 +210,27 @@ protected void run(String[] args) throws Exception {
 			throw new CliArgsException("Could not build the program from JAR file.", e);
 		}
 
-		final CustomCommandLine<?> customCommandLine = getActiveCustomCommandLine(commandLine);
-
+		final CustomCommandLine customCommandLine = getActiveCustomCommandLine(commandLine);
+		final Configuration executorConfig = customCommandLine.applyCommandLineOptionsToConfiguration(commandLine);
 		try {
-			runProgram(customCommandLine, commandLine, runOptions, program);
+			runProgram(executorConfig, runOptions, program);
 		} finally {
 			program.deleteExtractedLibraries();
 		}
 	}
 
 	private <T> void runProgram(
-			CustomCommandLine<T> customCommandLine,
-			CommandLine commandLine,
+			Configuration executorConfig,
 			RunOptions runOptions,
 			PackagedProgram program) throws ProgramInvocationException, FlinkException {
-		final ClusterDescriptor<T> clusterDescriptor = customCommandLine.createClusterDescriptor(commandLine);
+
+		final ClusterClientFactory<T> clusterClientFactory = clusterClientServiceLoader.getClusterClientFactory(executorConfig);
+		checkState(clusterClientFactory != null);
 
 Review comment:
   I don't think it is a state. `checkNotNull` could be better.

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