Author: cutting
Date: Fri Jun 15 14:38:15 2007
New Revision: 547796

URL: http://svn.apache.org/viewvc?view=rev&rev=547796
Log:
HADOOP-1482.  Fix secondary namenode to roll info port.  Contributed by Dhruba.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=547796&r1=547795&r2=547796
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Fri Jun 15 14:38:15 2007
@@ -137,6 +137,9 @@
      tasktracker to not be able to find cached files.
      (Arun C Murthy via cutting)
 
+ 44. HADOOP-1482.  Fix secondary namenode to roll info port.
+     (Dhruba Borthakur via cutting)
+
 
 Release 0.13.0 - 2007-06-08
 

Modified: 
lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java
URL: 
http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java?view=diff&rev=547796&r1=547795&r2=547796
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java 
(original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java 
Fri Jun 15 14:38:15 2007
@@ -98,10 +98,16 @@
     //
     infoPort = conf.getInt("dfs.secondary.info.port", 50090);
     infoBindAddress = conf.get("dfs.secondary.info.bindAddress", "0.0.0.0");
-    infoServer = new StatusHttpServer("dfs", infoBindAddress, infoPort, false);
+    infoServer = new StatusHttpServer("dfs", infoBindAddress, infoPort, true);
     infoServer.setAttribute("name.secondary", this);
+    this.infoServer.setAttribute("name.conf", conf);
     infoServer.addServlet("getimage", "/getimage", GetImageServlet.class);
     infoServer.start();
+
+    // The web-server port can be ephemeral... ensure we have the correct info
+    infoPort = infoServer.getPort();
+    conf.setInt("dfs.secondary.info.port", infoPort);
+    LOG.info("Secondary Web-server up at: " + 
conf.get("dfs.secondary.info.port"));
 
     //
     // Initialize other scheduling parameters from the configuration


Reply via email to