Description
Seen in a code review. Notable that if true, this got by all the FS contract tests —showing we missed a couple.
S3AFilesystem.create() does not examine its parent paths to verify that there does not exist one which is a file. It looks for the destination path if overwrite=false (see HADOOP-13188 for issues there), but it doesn't check the parent for not being a file, or the parent of that path.
It must go up the tree, verifying that either a path does not exist, or that the path is a directory. The scan can stop at the first entry which is is a directory, thus the operation is O(empty-directories) and not O(directories).
Attachments
Attachments
Issue Links
- is related to
-
HADOOP-13188 S3A file-create should throw error rather than overwrite directories
- Resolved
-
HADOOP-15542 S3AFileSystem - FileAlreadyExistsException when prefix is a file and part of a directory tree
- Resolved
- relates to
-
HADOOP-12667 s3a: Support createNonRecursive API
- Resolved
-
HADOOP-14506 Add create() contract test that verifies ancestor dir creation
- Resolved