소스 검색

svn merge -c 1562482 FIXES: YARN-1600. RM does not startup when security is enabled without spnego configured. Contributed by Haohui Mai

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1562483 13f79535-47bb-0310-9956-ffa450edef68
Jason Darrell Lowe 11 년 전
부모
커밋
bdb642032c

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -548,6 +548,9 @@ Release 2.3.0 - UNRELEASED
     YARN-1138. yarn.application.classpath is set to point to $HADOOP_CONF_DIR
     etc., which does not work on Windows. (Chuan Liu via cnauroth)
 
+    YARN-1600. RM does not startup when security is enabled without spnego
+    configured (Haohui Mai via jlowe)
+
 Release 2.2.0 - 2013-10-13
 
   INCOMPATIBLE CHANGES

+ 3 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/WebApps.java

@@ -223,7 +223,9 @@ public class WebApps {
             .setPathSpec(pathList.toArray(new String[0]));
 
         boolean hasSpnegoConf = spnegoPrincipalKey != null
-            && spnegoKeytabKey != null;
+            && conf.get(spnegoPrincipalKey) != null && spnegoKeytabKey != null
+            && conf.get(spnegoKeytabKey) != null;
+
         if (hasSpnegoConf) {
           builder.setUsernameConfKey(spnegoPrincipalKey)
               .setKeytabConfKey(spnegoKeytabKey)