eskabetxe commented on code in PR #29420:
URL: https://github.com/apache/flink/pull/29420#discussion_r4790298690


##########
flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/NativeS3FileSystem.java:
##########
@@ -274,6 +282,29 @@ public FileStatus getFileStatus(Path path) throws 
IOException {
         }
     }
 
+    /**
+     * Returns the {@link FileStatus} of a bucket-root path (an empty object 
key). Since S3 has no
+     * object to Head for the bucket root, the bucket is verified via 
HeadBucket (surfacing
+     * missing-bucket or permission errors) and reported as a directory, 
matching the behavior of
+     * flink-s3-fs-hadoop.
+     */
+    private FileStatus getBucketRootStatus(S3Client s3Client, Path path) 
throws IOException {
+        LOG.debug("Getting file status for bucket root: s3://{}", bucketName);
+        try {
+            
s3Client.headBucket(HeadBucketRequest.builder().bucket(bucketName).build());
+        } catch (NoSuchBucketException e) {

Review Comment:
   Dropped the dedicated NoSuchBucketException catch



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