hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r947224 - in /hadoop/common/branches/branch-0.20: CHANGES.txt src/core/org/apache/hadoop/http/HttpServer.java
Date Sat, 22 May 2010 00:47:32 GMT
Author: cos
Date: Sat May 22 00:47:32 2010
New Revision: 947224

URL: http://svn.apache.org/viewvc?rev=947224&view=rev
Log:
HADOOP-6760. WebServer shouldn't increase port number in case of negative port
setting caused by Jetty's race (cos)

Modified:
    hadoop/common/branches/branch-0.20/CHANGES.txt
    hadoop/common/branches/branch-0.20/src/core/org/apache/hadoop/http/HttpServer.java

Modified: hadoop/common/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/CHANGES.txt?rev=947224&r1=947223&r2=947224&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20/CHANGES.txt Sat May 22 00:47:32 2010
@@ -11,6 +11,9 @@ Release 0.20.3 - Unreleased
 
   BUG FIXES
 
+    HADOOP-6760. WebServer shouldn't increase port number in case of negative
+    port setting caused by Jetty's race (cos)
+
     MAPREDUCE-1522. FileInputFormat may use the default FileSystem for the
     input path. (Tsz Wo (Nicholas), SZE via cdouglas)
 

Modified: hadoop/common/branches/branch-0.20/src/core/org/apache/hadoop/http/HttpServer.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/core/org/apache/hadoop/http/HttpServer.java?rev=947224&r1=947223&r2=947224&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/src/core/org/apache/hadoop/http/HttpServer.java (original)
+++ hadoop/common/branches/branch-0.20/src/core/org/apache/hadoop/http/HttpServer.java Sat
May 22 00:47:32 2010
@@ -459,32 +459,6 @@ public class HttpServer implements Filte
           } //Workaround end
           LOG.info("Jetty bound to port " + port);
           webServer.start();
-          // Workaround for HADOOP-6386
-          port = listener.getLocalPort();
-          if (port < 0) {
-            LOG.warn("Bounds port is " + port + " after webserver start");
-            for (int i = 0; i < MAX_RETRIES/2; i++) {
-              try {
-                webServer.stop();
-              } catch (Exception e) {
-                LOG.warn("Can't stop  web-server", e);
-              }
-              Thread.sleep(1000);
-              
-              listener.setPort(oriPort == 0 ? 0 : (oriPort += 1));
-              listener.open();
-              Thread.sleep(100);
-              webServer.start();
-              LOG.info(i + "attempts to restart webserver");
-              port = listener.getLocalPort();
-              if (port > 0)
-                break;
-            }
-            if (port < 0)
-              throw new Exception("listener.getLocalPort() is returning " +
-                                "less than 0 even after " +MAX_RETRIES+" resets");
-          }
-          // End of HADOOP-6386 workaround
           break;
         } catch (IOException ex) {
           // if this is a bind exception,



Mime
View raw message