PatrickRen commented on code in PR #3194: URL: https://github.com/apache/flink-cdc/pull/3194#discussion_r1549116999
########## flink-cdc-cli/src/main/java/org/apache/flink/cdc/cli/utils/FlinkEnvironmentUtils.java: ########## @@ -20,17 +20,24 @@ import org.apache.flink.cdc.common.configuration.Configuration; import org.apache.flink.cdc.composer.flink.FlinkPipelineComposer; +import java.nio.file.Files; import java.nio.file.Path; import java.util.List; /** Utilities for handling Flink configuration and environment. */ public class FlinkEnvironmentUtils { private static final String FLINK_CONF_DIR = "conf"; - private static final String FLINK_CONF_FILENAME = "flink-conf.yaml"; + private static final String OLD_FLINK_CONF_FILENAME = "flink-conf.yaml"; + private static final String NEW_FLINK_CONF_FILENAME = "config.yaml"; public static Configuration loadFlinkConfiguration(Path flinkHome) throws Exception { - Path flinkConfPath = flinkHome.resolve(FLINK_CONF_DIR).resolve(FLINK_CONF_FILENAME); + Path flinkConfPath = flinkHome.resolve(FLINK_CONF_DIR).resolve(OLD_FLINK_CONF_FILENAME); + // If the old version of the configuration file does not exist, then attempt to use the new + // version of the file name. + if (!Files.exists(flinkConfPath)) { + flinkConfPath = flinkHome.resolve(FLINK_CONF_DIR).resolve(NEW_FLINK_CONF_FILENAME); + } return ConfigurationUtils.loadMapFormattedConfig(flinkConfPath); Review Comment: As the new `config.yaml` is not map-formatted anymore, I think we need to rewrite the parsing logic here. `ConfigurationUtils.loadMapFormattedConfig` assumes all configs are in flatten key:value format. -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org