hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bor...@apache.org
Subject svn commit: r991038 - in /hadoop/common/trunk: CHANGES.txt src/java/org/apache/hadoop/security/UserGroupInformation.java
Date Tue, 31 Aug 2010 00:10:05 GMT
Author: boryas
Date: Tue Aug 31 00:10:05 2010
New Revision: 991038

URL: http://svn.apache.org/viewvc?rev=991038&view=rev
Log:
HADOOP-6913. Circular initialization between UserGroupInformation and KerberosName

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

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=991038&r1=991037&r2=991038&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Tue Aug 31 00:10:05 2010
@@ -223,6 +223,9 @@ Trunk (unreleased changes)
     HADOOP-6932.  Namenode start (init) fails because of invalid kerberos 
     key, even when security set to "simple" (boryas)
 
+    HADOOP-6913. Circular initialization between UserGroupInformation and 
+    KerberosName (Kan Zhang via boryas)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/UserGroupInformation.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/UserGroupInformation.java?rev=991038&r1=991037&r2=991038&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/UserGroupInformation.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/UserGroupInformation.java Tue
Aug 31 00:10:05 2010
@@ -209,10 +209,25 @@ public class UserGroupInformation {
   }
 
   /**
-   * Set the configuration values for UGI.
+   * Initialize UGI and related classes.
    * @param conf the configuration to use
    */
   private static synchronized void initialize(Configuration conf) {
+    initUGI(conf);
+    // give the configuration on how to translate Kerberos names
+    try {
+      KerberosName.setConfiguration(conf);
+    } catch (IOException ioe) {
+      throw new RuntimeException("Problem with Kerberos auth_to_local name " +
+          "configuration", ioe);
+    }
+  }
+  
+  /**
+   * Set the configuration values for UGI.
+   * @param conf the configuration to use
+   */
+  private static synchronized void initUGI(Configuration conf) {
     String value = conf.get(HADOOP_SECURITY_AUTHENTICATION);
     if (value == null || "simple".equals(value)) {
       useKerberos = false;
@@ -233,13 +248,6 @@ public class UserGroupInformation {
     javax.security.auth.login.Configuration.setConfiguration
         (new HadoopConfiguration());
     
-    // give the configuration on how to translate Kerberos names
-    try {
-      KerberosName.setConfiguration(conf);
-    } catch (IOException ioe) {
-      throw new RuntimeException("Problem with Kerberos auth_to_local name " +
-          "configuration", ioe);
-    }
     isInitialized = true;
     UserGroupInformation.conf = conf;
   }



Mime
View raw message