[minor][cdc-cli] Suppress false alarm in flink config loader

This closes  #3292.
pull/3295/head
yux 8 months ago committed by GitHub
parent d97124fb9f
commit 4a8b587510
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -24,7 +24,6 @@ import org.apache.flink.runtime.jobgraph.SavepointRestoreSettings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.FileNotFoundException;
import java.nio.file.Path;
import java.util.List;
@ -38,13 +37,9 @@ public class FlinkEnvironmentUtils {
public static Configuration loadFlinkConfiguration(Path flinkHome) throws Exception {
Path flinkConfPath = flinkHome.resolve(FLINK_CONF_DIR).resolve(FLINK_CONF_FILENAME);
try {
if (flinkConfPath.toFile().exists()) {
return ConfigurationUtils.loadConfigFile(flinkConfPath);
} catch (FileNotFoundException e) {
LOG.warn(
"Failed to load the configuration file from {}. Trying to use legacy YAML parser to load flink configuration file from {}.",
FLINK_CONF_FILENAME,
LEGACY_FLINK_CONF_FILENAME);
} else {
return ConfigurationUtils.loadConfigFile(
flinkHome.resolve(FLINK_CONF_DIR).resolve(LEGACY_FLINK_CONF_FILENAME), true);
}

Loading…
Cancel
Save