Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ public static TypedProperties loadGlobalProps() {
if (defaultConfPath.isPresent()) {
conf.addPropsFromFile(defaultConfPath.get());
} else {
conf.addPropsFromFile(DEFAULT_PATH);
try {
conf.addPropsFromFile(DEFAULT_PATH);
} catch (Exception e) {
LOG.warn("Cannot load default config file: " + DEFAULT_PATH, e);
}
}
return conf.getProps();
}
Expand All @@ -126,13 +130,17 @@ public void addPropsFromFile(Path filePath) {
filePath.toString(),
Option.ofNullable(hadoopConfig).orElseGet(Configuration::new)
);

try {
if (filePath.equals(DEFAULT_PATH) && !fs.exists(filePath)) {
LOG.warn("Properties file " + filePath + " not found. Ignoring to load props file");
return;
}
} catch (IOException ioe) {
throw new HoodieIOException("Cannot check if the properties file exist: " + filePath, ioe);
}

BufferedReader reader = new BufferedReader(new InputStreamReader(fs.open(filePath)));
try (BufferedReader reader = new BufferedReader(new InputStreamReader(fs.open(filePath)))) {
visitedFilePaths.add(filePath.toString());
currentFilePath = filePath;
addPropsFromStream(reader);
Expand Down