use of org.apache.flink.table.client.gateway.Executor in project flink by apache.
the class DefaultContext method createExecutionConfig.
private static Configuration createExecutionConfig(CommandLine commandLine, Options commandLineOptions, List<CustomCommandLine> availableCommandLines, List<URL> dependencies) throws FlinkException {
LOG.debug("Available commandline options: {}", commandLineOptions);
List<String> options = Stream.of(commandLine.getOptions()).map(o -> o.getOpt() + "=" + o.getValue()).collect(Collectors.toList());
LOG.debug("Instantiated commandline args: {}, options: {}", commandLine.getArgList(), options);
final CustomCommandLine activeCommandLine = findActiveCommandLine(availableCommandLines, commandLine);
LOG.debug("Available commandlines: {}, active commandline: {}", availableCommandLines, activeCommandLine);
Configuration executionConfig = activeCommandLine.toConfiguration(commandLine);
try {
final ProgramOptions programOptions = ProgramOptions.create(commandLine);
final ExecutionConfigAccessor executionConfigAccessor = ExecutionConfigAccessor.fromProgramOptions(programOptions, dependencies);
executionConfigAccessor.applyToConfiguration(executionConfig);
} catch (CliArgsException e) {
throw new SqlExecutionException("Invalid deployment run options.", e);
}
LOG.info("Executor config: {}", executionConfig);
return executionConfig;
}
Aggregations