suryaprasanna opened a new pull request, #18176:
URL: https://github.com/apache/hudi/pull/18176

   ### Describe the issue this Pull Request addresses
   
   When users do not have read access on the `hoodie.properties` file, the 
error bubbles up as `FileNotFoundException` instead of showing the actual 
access control issue. 
   
   The job looks for `hoodie.properties` file and `hoodie.properties.backup` 
file in a loop alternatively. Since `AccessControlException` is a subclass of 
`IOException`, the final error seen by the user is `FileNotFoundException`, 
which is misleading.
   
   This PR fixes the issue by properly detecting and throwing access control 
exceptions with a clear error message.
   
   ### Summary and Changelog
   
   - **What changed**: Modified `ConfigUtils.fetchConfigs()` to detect 
permission denied errors by checking exception class name and message
   - **Why**: Users now see accurate error messages when they don't have read 
access to hoodie.properties instead of misleading FileNotFoundException
   - **How**: The fix checks if an IOException contains "AccessControl" in its 
class name or "Permission denied"/"Access denied" in its message, then throws a 
descriptive HoodieIOException
   
   The original fix applied the check in Hadoop's FileSystem layer. In the 
current codebase, the code has been refactored with the `fetchConfigs` method 
moved from `HoodieTableConfig` to `ConfigUtils` and using the storage 
abstraction layer. The fix has been adapted to work across different storage 
implementations (Hadoop, S3, GCS, etc.) without requiring direct Hadoop 
dependencies.
   
   ### Impact
   
   Users will now receive clear error messages when they encounter permission 
issues reading hoodie.properties files, making debugging easier.
   
   ### Risk Level
   
   **Low** - The change only affects error handling in the properties file 
reading logic. It does not modify the core functionality, only improves error 
reporting.
   
   ### Documentation Update
   
   None - This is an internal error handling improvement with no user-facing 
configuration or feature changes.
   
   ### 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] Build verification completed successfully
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to