This is an automated email from the ASF dual-hosted git repository.

stevel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b01efe5  HADOOP-16472. findbugs warning on 
LocalMetadataStore.ttlTimeProvider sync
b01efe5 is described below

commit b01efe5cf6e756baae650bc568a764e28ccfa858
Author: Steve Loughran <[email protected]>
AuthorDate: Fri Aug 2 22:30:48 2019 +0100

    HADOOP-16472. findbugs warning on LocalMetadataStore.ttlTimeProvider sync
    
    
    Contributed by Steve Loughran.
    
    Moved the setter and addAncestors to synchronized
    
    Change-Id: Ib362c66d1b8c9124eca7db9a44274ac08d0b3be6
---
 .../java/org/apache/hadoop/fs/s3a/s3guard/LocalMetadataStore.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 4ce6a7f..1cc4a61 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<PathMetadata> newDirs = new ArrayList<>();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to