nsivabalan opened a new pull request, #18805:
URL: https://github.com/apache/hudi/pull/18805
### Describe the issue this Pull Request addresses
`DFSPropertiesConfiguration.addPropsFromFile` only checked file existence
when the path equalled `DEFAULT_PATH`. For any other path — most commonly a
path coming from an `include=` directive pointing at a file that has been
removed or was never created — the writer would proceed to `open()` and surface
a `FileNotFoundException`, breaking the entire load even though the surrounding
inline properties and other includes were perfectly valid.
The existing log message in that branch already states the intent
(`"Properties file ... not found. Ignoring to load props file"`), but the
gating predicate prevented that branch from being entered for non-default paths.
### Summary and Changelog
- Drop the `filePath.equals(DEFAULT_PATH)` gate so a missing file is logged
and skipped uniformly, regardless of which call path triggered the load.
- Promote the log line from `debug` to `warn` so missing user-configured
property files are visible without bumping log levels.
- Three new unit tests in `TestDFSPropertiesConfiguration`:
- `testIncludeNonExistentFile` — absolute include path that does not
exist; load still succeeds for surrounding properties.
- `testIncludeNonExistentRelativeFile` — same for a relative include.
- `testMixedExistentAndNonExistentIncludes` — chain with some missing and
some present; missing ones are skipped, present include is merged.
### Impact
- Behavior change: a missing properties file (whether top-level or
referenced via `include=`) is no longer a hard failure. Callers that previously
relied on the `FileNotFoundException` to detect typos in `include=` directives
will instead see a `WARN` log line.
- No public API changes.
- No storage-format changes.
### Risk Level
low — purely a fix to error handling on a load path; semantics of valid
loads are unchanged.
### Documentation Update
none
### Contributor's checklist
- [x] Read through [contributor's
guide](https://hudi.apache.org/contribute/how-to-contribute)
- [x] Enough context is provided in the sections above
- [x] Adequate tests were added if applicable
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]