macdoor opened a new pull request, #27964:
URL: https://github.com/apache/flink/pull/27964

   ## What
   
   `NativeS3FileSystem.getFileStatus` always issued `HeadObject` with the key 
from `NativeS3AccessHelper.extractKey`. For a bucket root path such as 
`s3://my-bucket`, the key is empty and AWS SDK v2 rejects `HeadObject` with 
`Key cannot be empty`, breaking catalog creation / existence checks.
   
   ## Change
   
   * For an empty key, use `HeadBucket` and return a directory `FileStatus` 
when the bucket exists.
   * In `getDirectoryStatus`, use list prefix `""` for an empty key instead of 
`"/"` so bucket root listing matches actual object keys.
   
   ## Testing
   
   * `mvn spotless:check` (module `flink-s3-fs-native`)
   
   JIRA: https://issues.apache.org/jira/browse/FLINK-39485


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