Browse Source

HDFS-1044. Cannot submit mapreduce job from secure client to unsecure sever

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/trunk@947204 13f79535-47bb-0310-9956-ffa450edef68
Boris Shkolnik 15 years ago
parent
commit
5df5d68f3e
2 changed files with 10 additions and 1 deletions
  1. 4 1
      CHANGES.txt
  2. 6 0
      src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

+ 4 - 1
CHANGES.txt

@@ -20,7 +20,10 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
-    HDFS 1021. specify correct server principal for RefreshAuthorizationPolicyProtocol 
+    HDFS-1044. Cannot submit mapreduce job from secure client to 
+    unsecure sever (boryas)
+
+    HDFS-1021. specify correct server principal for RefreshAuthorizationPolicyProtocol 
     and RefreshUserToGroupMappingsProtocol protocols in DFSAdmin (for HADOOP-6612) (boryas)
 
     HDFS-970. fsync fsimage to disk before closing fsimage file.

+ 6 - 0
src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

@@ -4504,6 +4504,12 @@ public class FSNamesystem implements FSConstants, FSNamesystemMBean, FSClusterSt
       throw new IOException(
           "Delegation Token can be issued only with kerberos or web authentication");
     }
+    
+    if(dtSecretManager == null || !dtSecretManager.isRunning()) {
+      LOG.warn("trying to get DT with no secret manager running");
+      return null;
+    }
+
     UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
     String user = ugi.getUserName();
     Text owner = new Text(user);