You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/04/18 04:14:00 UTC

[jira] [Updated] (FLINK-39485) NativeS3FileSystem: support bucket-root paths (empty object key) using HeadBucket instead of HeadObject

     [ https://issues.apache.org/jira/browse/FLINK-39485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated FLINK-39485:
-----------------------------------
    Labels: pull-request-available  (was: )

> NativeS3FileSystem: support bucket-root paths (empty object key) using HeadBucket instead of HeadObject
> -------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-39485
>                 URL: https://issues.apache.org/jira/browse/FLINK-39485
>             Project: Flink
>          Issue Type: Bug
>          Components: FileSystems
>    Affects Versions: 2.3.0
>         Environment: Flink 2.3.x + flink-s3-fs-native + MinIO/S3-compatible endpoint as the deployment where catalog creation was tested.
>            Reporter: macdoor615
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.3.0
>
>
> h2. Problem
> Creating a catalog or checking existence for a warehouse URI of the form {{s3://my-bucket}} (no object prefix) fails with AWS SDK v2:
> {code:java}
> SdkClientException: Unable to marshall request to JSON: Key cannot be empty.
> Caused by: IllegalArgumentException: Key cannot be empty.{code}
> {{NativeS3FileSystem.getFileStatus}} always builds a {{HeadObject}} request. For the bucket root, {{NativeS3AccessHelper.extractKey}} returns an empty string, which is invalid for {{{}HeadObject{}}}.
> h2. Expected behavior
> Bucket root should resolve to a directory status if the bucket exists, e.g. by using {{HeadBucket}} (or an equivalent check), and listing semantics for the empty prefix should remain correct.
> h2. Related
> {{getDirectoryStatus}} should use prefix {{""}} for an empty key, not {{{}"/"{}}}, when listing the bucket root.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)