LuciferYang opened a new issue, #13242: URL: https://github.com/apache/gravitino/issues/13242
**Version** main branch **Describe what's wrong** `copyHdfsFileToLocal` reflectively calls `FileSystem.get(Configuration)`, which resolves the filesystem from `fs.defaultFS` and ignores the fetched uri's authority. Fetching `hdfs://clusterB/...` with a configuration whose `defaultFS` points at `clusterA` then fails with `Wrong FS` or copies from the wrong cluster. **Error message and/or stacktrace** `java.lang.IllegalArgumentException: Wrong FS: hdfs://clusterB/..., expected hdfs://clusterA` (Hadoop's Wrong FS error), or a silent copy from the wrong cluster. **How to reproduce** Call `copyHdfsFileToLocal` for an `hdfs://` uri whose authority differs from the configuration's `fs.defaultFS`; the copy fails with `Wrong FS` or reads from the default cluster. **Additional context** The `common` module has no Hadoop dependency. Found during a code audit of the `common` module. -- 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]
