Explorar el Código

HDFS-4413. Secondary namenode won't start if HDFS isn't the default file system. Contributed by Mostafa Elhemali.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1466322 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas hace 12 años
padre
commit
c0cdf0e26f

+ 3 - 0
CHANGES.txt

@@ -585,6 +585,9 @@ Release 1.2.0 - unreleased
     MAPREDUCE-5131. Fix handling of job monitoring APIs during JobTracker
     restart. (acmurthy) 
 
+    HDFS-4413. Secondary namenode won't start if HDFS isn't the default
+    file system. (Mostafa Elhemali via suresh)
+
 Release 1.1.2 - 2013.01.30
 
   INCOMPATIBLE CHANGES

+ 2 - 3
src/hdfs/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java

@@ -476,11 +476,10 @@ public class SecondaryNameNode implements Runnable {
    * Returns the Jetty server that the Namenode is listening on.
    */
   private String getInfoServer() throws IOException {
-    URI fsName = FileSystem.getDefaultUri(conf);
-    if (!"hdfs".equals(fsName.getScheme())) {
+    String infoAddr = NameNode.getInfoServer(conf);
+    if (infoAddr == null) {
       throw new IOException("This is not a DFS");
     }
-    String infoAddr = NameNode.getInfoServer(conf);
     LOG.debug("infoAddr = " + infoAddr);
     return infoAddr;
   }