org.apache.flink.runtime.entrypoint.ClusterConfigurationParserFactory Java Examples
The following examples show how to use
org.apache.flink.runtime.entrypoint.ClusterConfigurationParserFactory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TaskManagerRunner.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@VisibleForTesting static Configuration loadConfiguration(String[] args) throws FlinkParseException { final CommandLineParser<ClusterConfiguration> commandLineParser = new CommandLineParser<>(new ClusterConfigurationParserFactory()); final ClusterConfiguration clusterConfiguration; try { clusterConfiguration = commandLineParser.parse(args); } catch (FlinkParseException e) { LOG.error("Could not parse the command line options.", e); commandLineParser.printHelp(TaskManagerRunner.class.getSimpleName()); throw e; } final Configuration dynamicProperties = ConfigurationUtils.createConfiguration(clusterConfiguration.getDynamicProperties()); return GlobalConfiguration.loadConfiguration(clusterConfiguration.getConfigDir(), dynamicProperties); }
Example #2
Source File: TaskManagerRunner.java From flink with Apache License 2.0 | 6 votes |
@VisibleForTesting static Configuration loadConfiguration(String[] args) throws FlinkParseException { final CommandLineParser<ClusterConfiguration> commandLineParser = new CommandLineParser<>(new ClusterConfigurationParserFactory()); final ClusterConfiguration clusterConfiguration; try { clusterConfiguration = commandLineParser.parse(args); } catch (FlinkParseException e) { LOG.error("Could not parse the command line options.", e); commandLineParser.printHelp(TaskManagerRunner.class.getSimpleName()); throw e; } final Configuration dynamicProperties = ConfigurationUtils.createConfiguration(clusterConfiguration.getDynamicProperties()); return GlobalConfiguration.loadConfiguration(clusterConfiguration.getConfigDir(), dynamicProperties); }
Example #3
Source File: ConfigurationParserUtils.java From flink with Apache License 2.0 | 6 votes |
/** * Generate configuration from only the config file and dynamic properties. * @param args the commandline arguments * @param cmdLineSyntax the syntax for this application * @return generated configuration * @throws FlinkParseException if the configuration cannot be generated */ public static Configuration loadCommonConfiguration(String[] args, String cmdLineSyntax) throws FlinkParseException { final CommandLineParser<ClusterConfiguration> commandLineParser = new CommandLineParser<>(new ClusterConfigurationParserFactory()); final ClusterConfiguration clusterConfiguration; try { clusterConfiguration = commandLineParser.parse(args); } catch (FlinkParseException e) { LOG.error("Could not parse the command line options.", e); commandLineParser.printHelp(cmdLineSyntax); throw e; } final Configuration dynamicProperties = ConfigurationUtils.createConfiguration(clusterConfiguration.getDynamicProperties()); return GlobalConfiguration.loadConfiguration(clusterConfiguration.getConfigDir(), dynamicProperties); }