diff --git a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/LocalMetadataStore.java b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/LocalMetadataStore.java index 4ce6a7f9325..1cc4a61e229 100644 --- a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/LocalMetadataStore.java +++ b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/LocalMetadataStore.java @@ -605,12 +605,12 @@ public class LocalMetadataStore implements MetadataStore { } @Override - public void setTtlTimeProvider(ITtlTimeProvider ttlTimeProvider) { + public synchronized void setTtlTimeProvider(ITtlTimeProvider ttlTimeProvider) { this.ttlTimeProvider = ttlTimeProvider; } @Override - public void addAncestors(final Path qualifiedPath, + public synchronized void addAncestors(final Path qualifiedPath, @Nullable final BulkOperationState operationState) throws IOException { Collection newDirs = new ArrayList<>();