use of org.apache.flink.client.deployment.application.ApplicationConfiguration in project flink by apache.
the class KubernetesApplicationClusterEntrypoint method getPackagedProgram.
private static PackagedProgram getPackagedProgram(final Configuration configuration) throws FlinkException {
final ApplicationConfiguration applicationConfiguration = ApplicationConfiguration.fromConfiguration(configuration);
final PackagedProgramRetriever programRetriever = getPackagedProgramRetriever(configuration, applicationConfiguration.getProgramArguments(), applicationConfiguration.getApplicationClassName());
return programRetriever.getPackagedProgram();
}
use of org.apache.flink.client.deployment.application.ApplicationConfiguration in project flink by apache.
the class CliFrontend method runApplication.
// --------------------------------------------------------------------------------------------
// Execute Actions
// --------------------------------------------------------------------------------------------
protected void runApplication(String[] args) throws Exception {
LOG.info("Running 'run-application' command.");
final Options commandOptions = CliFrontendParser.getRunCommandOptions();
final CommandLine commandLine = getCommandLine(commandOptions, args, true);
if (commandLine.hasOption(HELP_OPTION.getOpt())) {
CliFrontendParser.printHelpForRunApplication(customCommandLines);
return;
}
final CustomCommandLine activeCommandLine = validateAndGetActiveCommandLine(checkNotNull(commandLine));
final ApplicationDeployer deployer = new ApplicationClusterDeployer(clusterClientServiceLoader);
final ProgramOptions programOptions;
final Configuration effectiveConfiguration;
// No need to set a jarFile path for Pyflink job.
if (ProgramOptionsUtils.isPythonEntryPoint(commandLine)) {
programOptions = ProgramOptionsUtils.createPythonProgramOptions(commandLine);
effectiveConfiguration = getEffectiveConfiguration(activeCommandLine, commandLine, programOptions, Collections.emptyList());
} else {
programOptions = new ProgramOptions(commandLine);
programOptions.validate();
final URI uri = PackagedProgramUtils.resolveURI(programOptions.getJarFilePath());
effectiveConfiguration = getEffectiveConfiguration(activeCommandLine, commandLine, programOptions, Collections.singletonList(uri.toString()));
}
final ApplicationConfiguration applicationConfiguration = new ApplicationConfiguration(programOptions.getProgramArgs(), programOptions.getEntryPointClassName());
deployer.run(effectiveConfiguration, applicationConfiguration);
}
use of org.apache.flink.client.deployment.application.ApplicationConfiguration in project flink by apache.
the class YarnApplicationClusterEntryPoint method getPackagedProgram.
private static PackagedProgram getPackagedProgram(final Configuration configuration) throws FlinkException {
final ApplicationConfiguration applicationConfiguration = ApplicationConfiguration.fromConfiguration(configuration);
final PackagedProgramRetriever programRetriever = getPackagedProgramRetriever(configuration, applicationConfiguration.getProgramArguments(), applicationConfiguration.getApplicationClassName());
return programRetriever.getPackagedProgram();
}
Aggregations