hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r570208 - in /lucene/hadoop/branches/branch-0.14: CHANGES.txt conf/hadoop-default.xml src/java/org/apache/hadoop/mapred/TaskRunner.java src/java/org/apache/hadoop/mapred/TaskTracker.java
Date Mon, 27 Aug 2007 18:13:54 GMT
Author: cutting
Date: Mon Aug 27 11:13:53 2007
New Revision: 570208

URL: http://svn.apache.org/viewvc?rev=570208&view=rev
Log:
Merge -r 570205:570204.  Reverting HADOOP-1739.

Modified:
    lucene/hadoop/branches/branch-0.14/CHANGES.txt
    lucene/hadoop/branches/branch-0.14/conf/hadoop-default.xml
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskRunner.java
    lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskTracker.java

Modified: lucene/hadoop/branches/branch-0.14/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/CHANGES.txt?rev=570208&r1=570207&r2=570208&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.14/CHANGES.txt Mon Aug 27 11:13:53 2007
@@ -8,11 +8,6 @@
     HADOOP-1740.  Fix null pointer exception in sorting map outputs. (Devaraj
     Das via omalley)
 
-    HADOOP-1739.  Fix task tracker report server to use a port
-    selected by the operating system by default rather than specifying
-    a port, which can fail when that port is not free.
-    (Arun C Murthy via cutting)
-
 
 Release 0.14.0 - 2007-08-17
 

Modified: lucene/hadoop/branches/branch-0.14/conf/hadoop-default.xml
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/conf/hadoop-default.xml?rev=570208&r1=570207&r2=570208&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/conf/hadoop-default.xml (original)
+++ lucene/hadoop/branches/branch-0.14/conf/hadoop-default.xml Mon Aug 27 11:13:53 2007
@@ -476,9 +476,9 @@
 
 <property>
   <name>mapred.task.tracker.report.port</name>
-  <value>0</value>
-  <description>The port number that the MapReduce task tracker report server uses.
-  By default we set it to zero to let the operating system pick an ephemeral port.
+  <value>50050</value>
+  <description>The port number that the MapReduce task tracker report server uses as
a starting
+               point to look for a free port to listen on.
   </description>
 </property>
 

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskRunner.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskRunner.java?rev=570208&r1=570207&r2=570208&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskRunner.java (original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskRunner.java Mon
Aug 27 11:13:53 2007
@@ -243,7 +243,7 @@
                                                    conf.get("mapred.child.java.opts", "-Xmx200m"),
                                                    conf.get("mapred.child.heap.size"));
         javaOpts = replaceAll(javaOpts, "@taskid@", taskid);
-        int port = tracker.getTaskTrackerReportPort() + 1;
+        int port = conf.getInt("mapred.task.tracker.report.port", 50050) + 1;
         javaOpts = replaceAll(javaOpts, "@port@", Integer.toString(port));
         String [] javaOptsSplit = javaOpts.split(" ");
         //Add java.library.path; necessary for native-hadoop libraries

Modified: lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskTracker.java?rev=570208&r1=570207&r2=570208&view=diff
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskTracker.java
(original)
+++ lucene/hadoop/branches/branch-0.14/src/java/org/apache/hadoop/mapred/TaskTracker.java
Mon Aug 27 11:13:53 2007
@@ -388,17 +388,22 @@
     this.myMetrics = new TaskTrackerMetrics();
     
     // port numbers
-    this.taskReportPort = this.fConf.getInt("mapred.task.tracker.report.port", 0);
+    this.taskReportPort = this.fConf.getInt("mapred.task.tracker.report.port", 50050);
     // bind address
-    this.taskReportBindAddress = this.fConf.get("mapred.task.tracker.report.bindAddress",

-                                                "0.0.0.0");
+    this.taskReportBindAddress = this.fConf.get("mapred.task.tracker.report.bindAddress",
"0.0.0.0");
 
     // RPC initialization
-    this.taskReportServer = RPC.getServer(this, this.taskReportBindAddress, 
-                                          this.taskReportPort, maxCurrentTasks, 
-                                          false, this.fConf);
-    this.taskReportServer.start();
+    while (true) {
+      try {
+        this.taskReportServer = RPC.getServer(this, this.taskReportBindAddress, this.taskReportPort,
maxCurrentTasks, false, this.fConf);
+        this.taskReportServer.start();
+        break;
+      } catch (BindException e) {
+        LOG.info("Could not open report server at " + this.taskReportPort + ", trying new
port");
+        this.taskReportPort++;
+      }
         
+    }
     // The rpc-server port can be ephemeral... 
     // ... ensure we have the correct info
     this.taskReportPort = taskReportServer.getListenerAddress().getPort();



Mime
View raw message