Sfoglia il codice sorgente

HADOOP-5505. Fix JspHelper initialization in the context of
MiniDFSCluster. (Raghu Angadi)

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

Raghu Angadi 16 anni fa
parent
commit
19845babb0

+ 3 - 0
CHANGES.txt

@@ -728,6 +728,9 @@ Release 0.20.0 - Unreleased
     HADOOP-5493. The shuffle copier threads return the codecs back to the pool when the
     shuffle completes. (Jothi Padmanabhan via ddas)
 
+    HADOOP-5505. Fix JspHelper initialization in the context of
+    MiniDFSCluster. (Raghu Angadi)
+
 Release 0.19.2 - Unreleased
 
   BUG FIXES

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/server/namenode/JspHelper.java

@@ -60,11 +60,11 @@ public class JspHelper {
   static Random rand = new Random();
 
   public JspHelper() {
+    fsn = FSNamesystem.getFSNamesystem();
     if (DataNode.getDataNode() != null) {
       nameNodeAddr = DataNode.getDataNode().getNameNodeAddr();
     }
     else {
-      fsn = FSNamesystem.getFSNamesystem();
       nameNodeAddr = fsn.getDFSNameNodeAddress(); 
     }