From 258c7d0f53fbdf4b0b9cae901701176e3e70c4fe Mon Sep 17 00:00:00 2001 From: Benoy Antony Date: Sat, 30 Aug 2014 12:49:19 -0700 Subject: [PATCH] HADOOP-10833. Remove unused cache in UserProvider. (Benoy Antony) --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ .../java/org/apache/hadoop/security/alias/UserProvider.java | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 3b44b8bebe..f3ef49d242 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -537,6 +537,8 @@ Release 2.6.0 - UNRELEASED schedules incoming calls and multiplexes outgoing calls. (Chris Li via Arpit Agarwal) + HADOOP-10833. Remove unused cache in UserProvider. (Benoy Antony) + BUG FIXES HADOOP-10781. Unportable getgrouplist() usage breaks FreeBSD (Dmitry diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/UserProvider.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/UserProvider.java index 99d6d0060d..262cbadd71 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/UserProvider.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/UserProvider.java @@ -21,9 +21,7 @@ import java.io.IOException; import java.net.URI; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.conf.Configuration; @@ -41,8 +39,6 @@ public class UserProvider extends CredentialProvider { public static final String SCHEME_NAME = "user"; private final UserGroupInformation user; private final Credentials credentials; - private final Map cache = new HashMap(); private UserProvider() throws IOException { user = UserGroupInformation.getCurrentUser(); @@ -86,7 +82,6 @@ public synchronized void deleteCredentialEntry(String name) throws IOException { throw new IOException("Credential " + name + " does not exist in " + this); } - cache.remove(name); } @Override