HADOOP-19256. S3A: Support Conditional Writes #7594
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
HADOOP-19256 for branch-3.4
Merge pain because branch-3.4 still supports deleting directory markers.
I wonder if we could backport that.
Amazon S3 now supports conditional overwrites, which can be be used when creating files through the createFile() API with two new builder options:
Write if and only if there is no object at the target path. This is an atomic PUT-no-overwrite, checked in close(), not create().
Write a file if and only if it is overwriting a file with a specific etag.
If the "fs.s3a.performance.flags" enumeration includes the flag "create" then file creation will use conditional creation to detect and reject overwrites.
The configuration option "fs.s3a.create.conditional.enabled" can be set to false to disable these features on third-party stores.
Contributed by Diljot Grewal, Saikat Roy and Steve Loughran
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?