Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundException when FileSystem.getFileStatus is called on a path referring to an empty directory #17306

Open
XComp opened this issue Feb 16, 2022 · 0 comments

Comments

@XComp
Copy link

XComp commented Feb 16, 2022

We ran into an issue where we created a new directory using FileSystem.mkdirs. We wanted to verify that it exists through FileSystem.getFileStatus(..) which resulted in a FileNotFoundException for the Presto S3 FileSystem because the implementation checks for objects having the given prefix. FileSystem.exists(..) works around it by catching the FileNotFoundException.

It looks like the API is inconsistent in handling empty directories here which shouldn't be the case in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant