Skip to content

Commit 6a2b198

Browse files
committed
HADOOP-18752. Change fs.s3a.directory.marker.retention to "keep" -everything but the switch
This change has all of PR apache#5689 *except* for changing the default value of marker retention from keep to delete. 1. leaves the default value of fs.s3a.directory.marker.retention at "delete" 2. no longer prints a message when an S3A FS instances is instantiated with any option other than delete. 3. Updates the directory marker documentation Switching to marker retention improves performance on any S3 bucket as there are no needless marker DELETE requests -leading to a reduction in write IOPS and and any delays waiting for the DELETE call to finish. There are *very* significant improvements on versioned buckets, where tombstone markers slow down LIST operations: the more tombstones there are, the worse query planning gets. Having versioning enabled on production stores is the foundation of any data protection strategy, so this has tangible benefits in production. Marker deletion is *not* compatible with older hadoop releases; specifically - Hadoop branch 2 < 2.10.2 - Any release of Hadoop 3.0.x and Hadoop 3.1.x - Hadoop 3.2.0 and 3.2.1 - Hadoop 3.3.0 Incompatible releases have no problems reading data in stores where markers are retained, but can get confused when deleting or renaming directories. Contributed by Steve Loughran Change-Id: Ic9a05357a4b1b1ff6dfecf8b0f30e1eeedb2fe75
1 parent 236b9aa commit 6a2b198

File tree

6 files changed

+139
-157
lines changed

6 files changed

+139
-157
lines changed

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/DirectoryPolicyImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ public static DirectoryPolicy getDirectoryPolicy(
186186
policy = DELETE;
187187
break;
188188
case DIRECTORY_MARKER_POLICY_KEEP:
189-
LOG.info("Directory markers will be kept");
189+
LOG.debug("Directory markers will be kept");
190190
policy = KEEP;
191191
break;
192192
case DIRECTORY_MARKER_POLICY_AUTHORITATIVE:
193-
LOG.info("Directory markers will be kept on authoritative"
193+
LOG.debug("Directory markers will be kept on authoritative"
194194
+ " paths");
195195
policy = new DirectoryPolicyImpl(MarkerPolicy.Authoritative,
196196
authoritativeness);

hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/committers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ Security
792792
Delegation token support is disabled
793793
794794
Directory Markers
795-
The directory marker policy is "delete"
795+
The directory marker policy is "keep"
796796
Available Policies: delete, keep, authoritative
797797
Authoritative paths: fs.s3a.authoritative.path=```
798798
```

0 commit comments

Comments
 (0)