slfan1989 opened a new pull request, #4160:
URL: https://github.com/apache/amoro/pull/4160
## Why are the changes needed?
In `MixedTableOperations.java`, the `metadataFileLocation()` and
`locationProvider()` methods are missing the `authenticatedFileIO.doAs()`
wrapper, while the same methods in the `temp()` implementation (lines 101-107)
do have this wrapper.
This inconsistency can lead to permission errors in authenticated
environments (e.g., Kerberos), where file operations may run under incorrect
authentication context.
All file I/O operations in this class should be wrapped with
`authenticatedFileIO.doAs()` to ensure consistent authentication context across
all methods.
Close #4159.
## Brief change log
- **MixedTableOperations.java**:
- Wrapped `metadataFileLocation(String fileName)` method call with
`authenticatedFileIO.doAs()` (line 64)
- Wrapped `locationProvider()` method call with
`authenticatedFileIO.doAs()` (line 69)
- Ensured consistency with other methods (`current()`, `refresh()`,
`commit()`) and the `temp()` implementation
## How was this patch tested?
- [x] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate
- [x] Run test locally before making a pull request
This change maintains the same behavior in non-authenticated environments
while ensuring correct permission handling in authenticated environments
(Kerberos, etc.).
## Documentation
- Does this pull request introduce a new feature? - no
- If yes, how is the feature documented? (not applicable / docs / JavaDocs /
not documented) - not 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]