[
https://issues.apache.org/jira/browse/HADOOP-19256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17942251#comment-17942251
]
ASF GitHub Bot commented on HADOOP-19256:
-----------------------------------------
steveloughran opened a new pull request, #7594:
URL: https://github.com/apache/hadoop/pull/7594
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:
fs.option.create.conditional.overwrite
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().
fs.option.create.conditional.overwrite.etag
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:
- [X] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
> S3A: Support S3 Conditional Writes
> ----------------------------------
>
> Key: HADOOP-19256
> URL: https://issues.apache.org/jira/browse/HADOOP-19256
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Reporter: Ahmar Suhail
> Assignee: Saikat Roy
> Priority: Major
> Labels: pull-request-available
>
> S3 Conditional Write (Put-if-absent) capability is now generally available -
> [https://aws.amazon.com/about-aws/whats-new/2024/08/amazon-s3-conditional-writes/]
>
> S3A should allow passing in this put-if-absent header to prevent over writing
> of files.
> There is a feature branch for this: HADOOP-19256-s3-conditional-writes
> + support etags to allow an overwrite to be restricted to overwriting a
> specific version. This can be done through a createFile option.
> https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-writes.html
> Fun fact; third party stores will not reject overwrites if they don't
> recognise the headers, so there's no way to be sure they are supported
> without testing.
> we need a flag to enable/disable conditional writes which can be exposed in a
> hasPathCapability()
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]