HADOOP-16472. findbugs warning on LocalMetadataStore.ttlTimeProvider sync

Contributed by Steve Loughran.

Moved the setter and addAncestors to synchronized

Change-Id: Ib362c66d1b8c9124eca7db9a44274ac08d0b3be6
This commit is contained in:
Steve Loughran 2019-08-02 22:30:48 +01:00 committed by GitHub
parent e7a0b8aa83
commit b01efe5cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -605,12 +605,12 @@ public RenameTracker initiateRenameOperation(final StoreContext storeContext,
}
@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<>();