LuciferYang opened a new pull request, #13243:
URL: https://github.com/apache/gravitino/pull/13243

   ### What changes were proposed in this pull request?
   
   `copyHdfsFileToLocal` now calls `FileSystem.get(URI, Configuration)` instead 
of `FileSystem.get(Configuration)`, resolving the filesystem from the fetched 
uri rather than from `fs.defaultFS`.
   
   ### Why are the changes needed?
   
   Resolving from `fs.defaultFS` ignored the fetched uri's authority, so 
fetching from a cluster other than the default failed with `Wrong FS` or copied 
from the wrong cluster.
   
   Fix: #13242
   
   ### Does this PR introduce _any_ user-facing change?
   
   No API change. Fetching an `hdfs://` uri whose authority differs from 
`fs.defaultFS` now resolves the correct filesystem instead of failing with 
`Wrong FS` or copying from the wrong cluster.
   
   ### How was this patch tested?
   
   Added `TestFileFetcher` coverage that pins `copyHdfsFileToLocal` resolving 
the filesystem from the fetched uri's authority; because the `common` module 
has no Hadoop dependency, it runs against minimal `org.apache.hadoop` test 
stubs whose default-FS overload reproduces Hadoop's `Wrong FS` behavior. It 
fails on the pre-fix tree and passes after the fix.
   


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