hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r954612 - in /hadoop/common/trunk: CHANGES.txt src/java/org/apache/hadoop/security/ShellBasedUnixGroupsMapping.java
Date Mon, 14 Jun 2010 20:02:56 GMT
Author: ddas
Date: Mon Jun 14 20:02:56 2010
New Revision: 954612

URL: http://svn.apache.org/viewvc?rev=954612&view=rev
Log:
HADOOP-6652. Removes the unnecessary cache from ShellBasedUnixGroupsMapping. Contributed by
Devaraj Das.

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/security/ShellBasedUnixGroupsMapping.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=954612&r1=954611&r2=954612&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Mon Jun 14 20:02:56 2010
@@ -88,6 +88,9 @@ Trunk (unreleased changes)
     HADOOP-6682. NetUtils:normalizeHostName does not process hostnames starting
     with [a-f] correctly. (jghoman)
 
+    HADOOP-6652. Removes the unnecessary cache from ShellBasedUnixGroupsMapping.
+    (ddas)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/ShellBasedUnixGroupsMapping.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/ShellBasedUnixGroupsMapping.java?rev=954612&r1=954611&r2=954612&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/ShellBasedUnixGroupsMapping.java
(original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/ShellBasedUnixGroupsMapping.java
Mon Jun 14 20:02:56 2010
@@ -39,19 +39,12 @@ import org.apache.hadoop.util.Shell.Exit
 @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"})
 @InterfaceStability.Evolving
 public class ShellBasedUnixGroupsMapping implements GroupMappingServiceProvider {
-  Map<String, List<String>> userGroups = 
-    new ConcurrentHashMap<String, List<String>>();
   
   private static final Log LOG = LogFactory.getLog(ShellBasedUnixGroupsMapping.class);
   
   @Override
   public List<String> getGroups(String user) throws IOException {
-    List<String> groups = userGroups.get(user);
-    if (groups == null) {
-      groups = getUnixGroups(user);
-      userGroups.put(user, groups);
-    }
-    return groups;
+    return getUnixGroups(user);
   }
 
   /** 



Mime
View raw message