thswlsqls opened a new issue, #10181:
URL: https://github.com/apache/paimon/issues/10181

   
   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ 9e306a4ee
   
   **Compute Engine**
   Engine-agnostic (S3 filesystem plugin); surfaced by Hive clone.
   
   **Minimal reproduce step**
   1. Create a HiveCatalog with warehouse `s3://bucket/wh`. 
`HiveCatalog.createHiveCatalog` builds one FileIO and 
`checkOrMkdirs(warehouse)` caches the `s3` FileSystem.
   2. Clone a Hive table whose HMS location is `s3a://bucket/...`. 
`CloneFilesFunction` and `HiveCloneUtils.listFiles` read it through the same 
`hiveCatalog.fileIO()`.
   3. Fails with `IllegalArgumentException: Wrong FS s3a://bucket/... -expected 
s3://bucket`.
   
   Cause: `HadoopCompliantFileIO.getFileSystem()` (paimon-s3-impl) keys `fsMap` 
by authority only, while each `S3AFileSystem` is bound to its scheme. Core 
`HadoopFileIO` already keys by `Pair.of(scheme, authority)` (#2504).
   
   **What doesn't meet your expectations?**
   One S3 FileIO should serve both schemes, since the S3 plugin also serves 
`s3a://` (#9814). Actual: the first cached scheme wins.
   
   **Anything else?**
   - Also reachable via `data-file.external-paths` with another scheme, only 
when `resolving-file-io.enabled=false`; `ResolvingFileIO` already keys by 
scheme and authority.
   - Cross-scheme rename (e.g. Hive migrate, s3a to s3) still fails; out of 
scope.
   
   **Are you willing to submit a PR?**
   - [x] I'm willing to submit a PR!
   
   


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