hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r765809 - in /hadoop/core/trunk: CHANGES.txt src/test/org/apache/hadoop/mapred/TestMRServerPorts.java
Date Thu, 16 Apr 2009 23:57:50 GMT
Author: hairong
Date: Thu Apr 16 23:57:49 2009
New Revision: 765809

URL: http://svn.apache.org/viewvc?rev=765809&view=rev
Log:
HADOOP-5655. TestMRServerPorts fails on java.net.BindException. Contributed by Devaraj Das.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=765809&r1=765808&r2=765809&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Apr 16 23:57:49 2009
@@ -1256,6 +1256,9 @@
     HADOOP-5654. TestReplicationPolicy.<init> fails on java.net.BindException.
     (hairong)
 
+    HADOOP-5655. TestMRServerPorts fails on java.net.BindException. (Devaraj
+    Das via hairong)
+
 Release 0.19.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java?rev=765809&r1=765808&r2=765809&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java Thu Apr 16
23:57:49 2009
@@ -22,6 +22,7 @@
 import org.apache.hadoop.hdfs.TestHDFSServerPorts;
 import org.apache.hadoop.hdfs.server.datanode.DataNode;
 import org.apache.hadoop.hdfs.server.namenode.NameNode;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 
 /**
@@ -72,6 +73,15 @@
     }
     return jt;
   }
+  
+  private void setDataNodePorts(Configuration conf) {
+    conf.set("dfs.datanode.address", 
+        TestHDFSServerPorts.NAME_NODE_HOST + "0");
+    conf.set("dfs.datanode.http.address", 
+        TestHDFSServerPorts.NAME_NODE_HTTP_HOST + "0");
+    conf.set("dfs.datanode.ipc.address", 
+        TestHDFSServerPorts.NAME_NODE_HOST + "0");
+  }
 
   /**
    * Check whether the JobTracker can be started.
@@ -116,6 +126,7 @@
     DataNode dn = null;
     try {
       nn = hdfs.startNameNode();
+      setDataNodePorts(hdfs.getConfig());
       dn = hdfs.startDataNode(1, hdfs.getConfig());
 
       // start job tracker on the same port as name-node
@@ -157,6 +168,7 @@
     JTRunner runner = null;
     try {
       nn = hdfs.startNameNode();
+      setDataNodePorts(hdfs.getConfig());
       dn = hdfs.startDataNode(2, hdfs.getConfig());
 
       JobConf conf2 = new JobConf(hdfs.getConfig());



Mime
View raw message