@Test public void testSubstituteConfigKey() { String deprecatedKey1 = "deprecated-key"; String deprecatedKey2 = "another-out_of-date_key"; String deprecatedKey3 = "yet-one-more"; String designatedKey1 = "newkey1"; String designatedKey2 = "newKey2"; String designatedKey3 = "newKey3"; String value1 = "value1"; String value2Designated = "designated-value2"; String value2Deprecated = "deprecated-value2"; Configuration cfg = new Configuration(); cfg.setString(deprecatedKey1, value1); cfg.setString(deprecatedKey2, value2Deprecated); cfg.setString(designatedKey2, value2Designated); BootstrapTools.substituteDeprecatedConfigKey(cfg, deprecatedKey1, designatedKey1); BootstrapTools.substituteDeprecatedConfigKey(cfg, deprecatedKey2, designatedKey2); BootstrapTools.substituteDeprecatedConfigKey(cfg, deprecatedKey3, designatedKey3); assertEquals(value1, cfg.getString(designatedKey1, null)); assertEquals(value2Designated, cfg.getString(designatedKey2, null)); assertNull(cfg.getString(designatedKey3, null)); assertNull(cfg.getString(deprecatedKey3, null)); }
public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } }
BootstrapTools { public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } } }
BootstrapTools { public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } } private  BootstrapTools(); }
BootstrapTools { public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } } private  BootstrapTools(); static ActorSystem startActorSystem(
		Configuration configuration,
		String listeningAddress,
		String portRangeDefinition,
		Logger logger); static ActorSystem startActorSystem(
			Configuration configuration,
			String listeningAddress,
			String portRangeDefinition,
			Logger logger,
			@Nonnull ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static ActorSystem startActorSystem(
			Configuration configuration,
			String actorSystemName,
			String listeningAddress,
			String portRangeDefinition,
			Logger logger,
			@Nonnull ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static ActorSystem startActorSystem(
		Configuration configuration,
		String listeningAddress,
		int listeningPort,
		Logger logger); static ActorSystem startActorSystem(
				Configuration configuration,
				String listeningAddress,
				int listeningPort,
				Logger logger,
				ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static ActorSystem startActorSystem(
		Configuration configuration,
		String actorSystemName,
		String listeningAddress,
		int listeningPort,
		Logger logger,
		ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static Configuration generateTaskManagerConfiguration(
				Configuration baseConfig,
				String jobManagerHostname,
				int jobManagerPort,
				int numSlots,
				FiniteDuration registrationTimeout); static void writeConfiguration(Configuration cfg, File file); static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated); static void substituteDeprecatedConfigPrefix(
			Configuration config,
			String deprecatedPrefix,
			String designatedPrefix); static Option newDynamicPropertiesOption(); static Configuration parseDynamicProperties(CommandLine cmd); static String getTaskManagerShellCommand(
			Configuration flinkConfig,
			ContaineredTaskManagerParameters tmParams,
			String configDirectory,
			String logDirectory,
			boolean hasLogback,
			boolean hasLog4j,
			boolean hasKrb5,
			Class<?> mainClass); static String getStartCommand(String template,
		Map<String, String> startCommandValues); static void updateTmpDirectoriesInConfiguration(
			Configuration configuration,
			@Nullable String defaultDirs); static Configuration cloneConfiguration(Configuration configuration); }
BootstrapTools { public static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated) { if (!config.containsKey(designated)) { final String valueForDeprecated = config.getString(deprecated, null); if (valueForDeprecated != null) { config.setString(designated, valueForDeprecated); } } } private  BootstrapTools(); static ActorSystem startActorSystem(
		Configuration configuration,
		String listeningAddress,
		String portRangeDefinition,
		Logger logger); static ActorSystem startActorSystem(
			Configuration configuration,
			String listeningAddress,
			String portRangeDefinition,
			Logger logger,
			@Nonnull ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static ActorSystem startActorSystem(
			Configuration configuration,
			String actorSystemName,
			String listeningAddress,
			String portRangeDefinition,
			Logger logger,
			@Nonnull ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static ActorSystem startActorSystem(
		Configuration configuration,
		String listeningAddress,
		int listeningPort,
		Logger logger); static ActorSystem startActorSystem(
				Configuration configuration,
				String listeningAddress,
				int listeningPort,
				Logger logger,
				ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static ActorSystem startActorSystem(
		Configuration configuration,
		String actorSystemName,
		String listeningAddress,
		int listeningPort,
		Logger logger,
		ActorSystemExecutorConfiguration actorSystemExecutorConfiguration); static Configuration generateTaskManagerConfiguration(
				Configuration baseConfig,
				String jobManagerHostname,
				int jobManagerPort,
				int numSlots,
				FiniteDuration registrationTimeout); static void writeConfiguration(Configuration cfg, File file); static void substituteDeprecatedConfigKey(Configuration config, String deprecated, String designated); static void substituteDeprecatedConfigPrefix(
			Configuration config,
			String deprecatedPrefix,
			String designatedPrefix); static Option newDynamicPropertiesOption(); static Configuration parseDynamicProperties(CommandLine cmd); static String getTaskManagerShellCommand(
			Configuration flinkConfig,
			ContaineredTaskManagerParameters tmParams,
			String configDirectory,
			String logDirectory,
			boolean hasLogback,
			boolean hasLog4j,
			boolean hasKrb5,
			Class<?> mainClass); static String getStartCommand(String template,
		Map<String, String> startCommandValues); static void updateTmpDirectoriesInConfiguration(
			Configuration configuration,
			@Nullable String defaultDirs); static Configuration cloneConfiguration(Configuration configuration);  }