From a13be203b7877ba56ef63aac4a2e65d4e1a4adbc Mon Sep 17 00:00:00 2001 From: Da Zhou Date: Tue, 13 Nov 2018 21:46:18 +0000 Subject: [PATCH] HADOOP-15876. Use keySet().removeAll() to remove multiple keys from Map in AzureBlobFileSystemStore Contributed by Da Zhou. --- .../apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java index bfdbba83763..f300a9ab177 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java @@ -678,9 +678,7 @@ public class AzureBlobFileSystemStore { } } - for (Map.Entry defaultAclEntry : defaultAclEntries.entrySet()) { - aclEntries.remove(defaultAclEntry.getKey()); - } + aclEntries.keySet().removeAll(defaultAclEntries.keySet()); client.setAcl(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true), AbfsAclHelper.serializeAclSpec(aclEntries), eTag);