瀏覽代碼

HDFS-2328. HFTP throws NPE if security is enabled locally, but not
remotely. (omalley)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-205@1170696 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 13 年之前
父節點
當前提交
5e2f77b128
共有 2 個文件被更改,包括 14 次插入8 次删除
  1. 8 5
      CHANGES.txt
  2. 6 3
      src/hdfs/org/apache/hadoop/hdfs/HftpFileSystem.java

+ 8 - 5
CHANGES.txt

@@ -47,7 +47,7 @@ Release 0.20.205.0 - 2011.09.12
     (Todd Lipcon via eli)
   
     HADOOP-7400. Fix HdfsProxyTests fails when the -Dtest.build.dir 
-    and -Dbuild.test is set a dir other than build dir (gkesavan).
+    and -Dbuild.test is set a dir other than build dir (gkesavan)
 
     MAPREDUCE-2650. back-port MAPREDUCE-2238 to 0.20-security. 
     (Sherry Chen via mahadev)
@@ -113,11 +113,11 @@ Release 0.20.205.0 - 2011.09.12
     HDFS-1122. client block verification may result in blocks in 
     DataBlockScanner prematurely. (Sam Rash via jitendra)
 
-    HADOOP-6722. NetUtils.connect should check that it hasn't connected a socket
-    to itself. (Todd Lipcon via suresh)
+    HADOOP-6722. NetUtils.connect should check that it hasn't connected a 
+    socket to itself. (Todd Lipcon via suresh)
 
-    HDFS-1779. After NameNode restart , Clients can not read partial files even after 
-    client invokes Sync. (Uma Maheswara Rao G via jitendra)
+    HDFS-1779. After NameNode restart , Clients can not read partial files 
+    even after client invokes Sync. (Uma Maheswara Rao G via jitendra)
 
     HDFS-1197. Blocks are considered "complete" prematurely after 
     commitBlockSynchronization or DN restart. (Todd Lipcon via jitendra)
@@ -139,6 +139,9 @@ Release 0.20.205.0 - 2011.09.12
     MAPREDUCE-2549. Fix resource leaks in Eclipse plugin. (Devaraj K via
     acmurthy) 
 
+    HDFS-2328. HFTP throws NPE if security is enabled locally, but not 
+    remotely. (omalley)
+
   IMPROVEMENTS
 
     MAPREDUCE-2187. Reporter sends progress during sort/merge. (Anupam Seth via

+ 6 - 3
src/hdfs/org/apache/hadoop/hdfs/HftpFileSystem.java

@@ -180,9 +180,12 @@ public class HftpFileSystem extends FileSystem {
       
       //since we don't already have a token, go get one over https
       if (delegationToken == null) {
-        setDelegationToken(getDelegationToken(null));
-        renewer.addTokenToRenew(this);
-        LOG.debug("Created new DT for " + delegationToken.getService());
+        Token<?> newToken = getDelegationToken(null);
+        if (newToken != null) {
+          setDelegationToken(newToken);
+          renewer.addTokenToRenew(this);
+          LOG.debug("Created new DT for " + delegationToken.getService());
+        }
       } else {
         LOG.debug("Found existing DT for " + delegationToken.getService());        
       }