hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r616904 - in /hadoop/core/branches/branch-0.16: ./ conf/ src/java/org/apache/hadoop/dfs/ src/java/org/apache/hadoop/mapred/ src/java/org/apache/hadoop/net/ src/test/org/apache/hadoop/dfs/ src/test/org/apache/hadoop/mapred/
Date Wed, 30 Jan 2008 21:07:37 GMT
Author: omalley
Date: Wed Jan 30 13:07:34 2008
New Revision: 616904

URL: http://svn.apache.org/viewvc?rev=616904&view=rev
Log:
Merge of -r 616898:616899 from trunk to 0.16 branch to fix HADOOP-2404.

Modified:
    hadoop/core/branches/branch-0.16/CHANGES.txt
    hadoop/core/branches/branch-0.16/conf/hadoop-default.xml
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DFSck.java
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DataNode.java
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/FSNamesystem.java
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/JobTracker.java
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/TaskTracker.java
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/net/NetUtils.java
    hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/MiniDFSCluster.java
    hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestCheckpoint.java
    hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestHDFSServerPorts.java
    hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/MiniMRCluster.java
    hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java

Modified: hadoop/core/branches/branch-0.16/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/CHANGES.txt?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.16/CHANGES.txt Wed Jan 30 13:07:34 2008
@@ -36,8 +36,32 @@
     HADOOP-2184.  RPC Support for user permissions and authentication.
     (Raghu Angadi via dhruba)
 
-    HADOOP-2185.  RPC Server uses any available port if the specified port is
-    zero. Otherwise it uses the specified port.
+    HADOOP-2185.  RPC Server uses any available port if the specified
+    port is zero. Otherwise it uses the specified port. Also combines
+    the configuration attributes for the servers' bind address and
+    port from "x.x.x.x" and "y" to "x.x.x.x:y". 
+    Deprecated configuration variables:
+      dfs.info.bindAddress
+      dfs.info.port
+      dfs.datanode.bindAddress
+      dfs.datanode.port
+      dfs.datanode.info.bindAdress
+      dfs.datanode.info.port
+      dfs.secondary.info.bindAddress
+      dfs.secondary.info.port
+      mapred.job.tracker.info.bindAddress
+      mapred.job.tracker.info.port
+      mapred.task.tracker.report.bindAddress
+      tasktracker.http.bindAddress
+      tasktracker.http.port
+    New configuration variables (post HADOOP-2404):
+      dfs.secondary.http.address
+      dfs.datanode.address
+      dfs.datanode.http.address
+      dfs.http.address
+      mapred.job.tracker.http.address
+      mapred.task.tracker.report.address
+      mapred.task.tracker.http.address
     (Konstantin Shvachko via dhruba)
 
     HADOOP-2401.  Only the current leaseholder can abandon a block for
@@ -623,6 +647,9 @@
 
     HADOOP-2732. Fix bug in path globbing.  (Hairong Kuang via nigel)
 
+    HADOOP-2404. Fix backwards compatability with hadoop-0.15 configuration
+    files that was broken by HADOOP-2185. (omalley)
+    
 Release 0.15.3 - 2008-01-18
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.16/conf/hadoop-default.xml
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/conf/hadoop-default.xml?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/conf/hadoop-default.xml (original)
+++ hadoop/core/branches/branch-0.16/conf/hadoop-default.xml Wed Jan 30 13:07:34 2008
@@ -184,34 +184,34 @@
 </property>
 
 <property>
-  <name>dfs.secondary.http.bindAddress</name>
+  <name>dfs.secondary.http.address</name>
   <value>0.0.0.0:50090</value>
   <description>
-    The secondary namenode http server bind address and port.
+    The secondary namenode http server address and port.
     If the port is 0 then the server will start on a free port.
   </description>
 </property>
 
 <property>
-  <name>dfs.datanode.bindAddress</name>
+  <name>dfs.datanode.address</name>
   <value>0.0.0.0:50010</value>
   <description>
-    The address where the datanode will listen to.
+    The address where the datanode server will listen to.
     If the port is 0 then the server will start on a free port.
   </description>
 </property>
 
 <property>
-  <name>dfs.datanode.http.bindAddress</name>
+  <name>dfs.datanode.http.address</name>
   <value>0.0.0.0:50075</value>
   <description>
-    The datanode http server bind address and port.
+    The datanode http server address and port.
     If the port is 0 then the server will start on a free port.
   </description>
 </property>
 
 <property>
-  <name>dfs.http.bindAddress</name>
+  <name>dfs.http.address</name>
   <value>0.0.0.0:50070</value>
   <description>
     The address and the base port where the dfs namenode web ui will listen on.
@@ -498,10 +498,10 @@
 </property>
 
 <property>
-  <name>mapred.job.tracker.http.bindAddress</name>
+  <name>mapred.job.tracker.http.address</name>
   <value>0.0.0.0:50030</value>
   <description>
-    The job tracker http server bind address and port.
+    The job tracker http server address and port the server will listen on.
     If the port is 0 then the server will start on a free port.
   </description>
 </property>
@@ -516,10 +516,12 @@
 </property>
 
 <property>
-  <name>mapred.task.tracker.report.bindAddress</name>
+  <name>mapred.task.tracker.report.address</name>
   <value>127.0.0.1:0</value>
-  <description>The interface that task processes use to communicate
-  with their parent tasktracker process.</description>
+  <description>The interface and port that task tracker server listens on. 
+  Since it is only connected to by the tasks, it uses the local interface.
+  EXPERT ONLY. Should only be changed if your host does not have the loopback 
+  interface.</description>
 </property>
 
 <property>
@@ -747,10 +749,10 @@
 </property>
 
 <property>
-  <name>mapred.task.tracker.http.bindAddress</name>
+  <name>mapred.task.tracker.http.address</name>
   <value>0.0.0.0:50060</value>
   <description>
-    The task tracker http server bind address and port.
+    The task tracker http server address and port.
     If the port is 0 then the server will start on a free port.
   </description>
 </property>

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DFSck.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DFSck.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DFSck.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DFSck.java Wed Jan 30
13:07:34 2008
@@ -26,6 +26,7 @@
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
+import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 
@@ -66,7 +67,8 @@
   }
   
   private String getInfoServer() throws IOException {
-    return getConf().get("dfs.http.bindAddress", "0.0.0.0:50070");
+    return NetUtils.getServerAddress(getConf(), "dfs.info.bindAddress", 
+                                     "dfs.info.port", "dfs.http.address");
   }
   
   /**

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DataNode.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DataNode.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DataNode.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/DataNode.java Wed Jan
30 13:07:34 2008
@@ -192,7 +192,11 @@
     this.estimateBlockSize = conf.getLong("dfs.block.size", DEFAULT_BLOCK_SIZE);
     this.socketTimeout =  conf.getInt("dfs.socket.timeout",
                                       FSConstants.READ_TIMEOUT);
-    String address = conf.get("dfs.datanode.bindAddress", "0.0.0.0:50010");
+    String address = 
+      NetUtils.getServerAddress(conf,
+                                "dfs.datanode.bindAddress", 
+                                "dfs.datanode.port",
+                                "dfs.datanode.address");
     InetSocketAddress socAddr = NetUtils.createSocketAddr(address);
     int tmpPort = socAddr.getPort();
     storage = new DataStorage();
@@ -284,7 +288,11 @@
     }
     
     //create a servlet to serve full-file content
-    String infoAddr = conf.get("dfs.datanode.http.bindAddress", "0.0.0.0:50075");
+    String infoAddr = 
+      NetUtils.getServerAddress(conf, 
+                              "dfs.datanode.info.bindAddress", 
+                              "dfs.datanode.info.port",
+                              "dfs.datanode.http.address");
     InetSocketAddress infoSocAddr = NetUtils.createSocketAddr(infoAddr);
     String infoHost = infoSocAddr.getHostName();
     int tmpInfoPort = infoSocAddr.getPort();

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/FSNamesystem.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/FSNamesystem.java Wed
Jan 30 13:07:34 2008
@@ -276,7 +276,9 @@
     this.dnthread = new Daemon(new DecommissionedMonitor());
     dnthread.start();
 
-    String infoAddr = conf.get("dfs.http.bindAddress", "0.0.0.0:50070");
+    String infoAddr = 
+      NetUtils.getServerAddress(conf, "dfs.info.bindAddress", 
+                                "dfs.info.port", "dfs.http.address");
     InetSocketAddress infoSocAddr = NetUtils.createSocketAddr(infoAddr);
     String infoHost = infoSocAddr.getHostName();
     int tmpInfoPort = infoSocAddr.getPort();
@@ -293,8 +295,8 @@
 
     // The web-server port can be ephemeral... ensure we have the correct info
     this.infoPort = this.infoServer.getPort();
-    conf.set("dfs.http.bindAddress", infoHost + ":" + infoPort); 
-    LOG.info("Web-server up at: " + conf.get("dfs.http.bindAddress"));
+    conf.set("dfs.http.address", infoHost + ":" + infoPort);
+    LOG.info("Web-server up at: " + infoHost + ":" + infoPort);
   }
 
   static Collection<File> getNamespaceDirs(Configuration conf) {

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/HftpFileSystem.java Wed
Jan 30 13:07:34 2008
@@ -82,7 +82,11 @@
     this.fsport = name.getPort();
     if(fsport >= 0)
       return;
-    String infoAddr = conf.get("dfs.http.bindAddress", "0.0.0.0:50070");
+    String infoAddr = 
+      NetUtils.getServerAddress(conf, 
+                                "dfs.info.bindAddress", 
+                                "dfs.info.port", 
+                                "dfs.http.address");
     this.fsport = NetUtils.createSocketAddr(infoAddr).getPort();
   }
 

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java
(original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/SecondaryNameNode.java
Wed Jan 30 13:07:34 2008
@@ -101,8 +101,11 @@
     //
     // initialize the webserver for uploading files.
     //
-    String infoAddr = conf.get("dfs.secondary.http.bindAddress", 
-                                "0.0.0.0:50090");
+    String infoAddr = 
+      NetUtils.getServerAddress(conf, 
+                                "dfs.secondary.info.bindAddress",
+                                "dfs.secondary.info.port",
+                                "dfs.secondary.http.address");
     InetSocketAddress infoSocAddr = NetUtils.createSocketAddr(infoAddr);
     infoBindAddress = infoSocAddr.getHostName();
     int tmpInfoPort = infoSocAddr.getPort();
@@ -116,8 +119,7 @@
     // The web-server port can be ephemeral... ensure we have the correct info
     infoPort = infoServer.getPort();
     conf.set("dfs.secondary.http.bindAddress", infoBindAddress + ":" +infoPort); 
-    LOG.info("Secondary Web-server up at: " 
-              + conf.get("dfs.secondary.http.bindAddress"));
+    LOG.info("Secondary Web-server up at: " + infoBindAddress + ":" +infoPort);
 
     //
     // Initialize other scheduling parameters from the configuration
@@ -253,7 +255,8 @@
     if (fsName.equals("local")) {
       throw new IOException("This is not a DFS");
     }
-    return conf.get("dfs.http.bindAddress", "0.0.0.0:50070");
+    return NetUtils.getServerAddress(conf, "dfs.info.bindAddress", 
+                                     "dfs.info.port", "dfs.http.address");
   }
 
   /*

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/JobTracker.java Wed
Jan 30 13:07:34 2008
@@ -647,8 +647,10 @@
       }
     }
 
-    String infoAddr = conf.get("mapred.job.tracker.http.bindAddress",
-                                "0.0.0.0:50030");
+    String infoAddr = 
+      NetUtils.getServerAddress(conf, "mapred.job.tracker.info.bindAddress",
+                                "mapred.job.tracker.info.port",
+                                "mapred.job.tracker.http.address");
     InetSocketAddress infoSocAddr = NetUtils.createSocketAddr(infoAddr);
     String infoBindAddress = infoSocAddr.getHostName();
     int tmpInfoPort = infoSocAddr.getPort();

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/TaskTracker.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/TaskTracker.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/mapred/TaskTracker.java Wed
Jan 30 13:07:34 2008
@@ -416,7 +416,10 @@
     
     // bind address
     String address = 
-      this.fConf.get("mapred.task.tracker.report.bindAddress", "127.0.0.1:0");
+      NetUtils.getServerAddress(fConf,
+                                "mapred.task.tracker.report.bindAddress", 
+                                "mapred.task.tracker.report.port", 
+                                "mapred.task.tracker.report.address");
     InetSocketAddress socAddr = NetUtils.createSocketAddr(address);
     String bindAddress = socAddr.getHostName();
     int tmpPort = socAddr.getPort();
@@ -803,8 +806,11 @@
     this.jobTrackAddr = JobTracker.getAddress(conf);
     this.mapOutputFile = new MapOutputFile();
     this.mapOutputFile.setConf(conf);
-    String infoAddr = conf.get("mapred.task.tracker.http.bindAddress", 
-                                "0.0.0.0:50060");
+    String infoAddr = 
+      NetUtils.getServerAddress(conf,
+                                "tasktracker.http.bindAddress", 
+                                "tasktracker.http.port",
+                                "mapred.task.tracker.http.address");
     InetSocketAddress infoSocAddr = NetUtils.createSocketAddr(infoAddr);
     String httpBindAddress = infoSocAddr.getHostName();
     int httpPort = infoSocAddr.getPort();

Modified: hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/net/NetUtils.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/net/NetUtils.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/net/NetUtils.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/net/NetUtils.java Wed Jan
30 13:07:34 2008
@@ -21,12 +21,15 @@
 import java.net.URI;
 import javax.net.SocketFactory;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.ipc.VersionedProtocol;
 import org.apache.hadoop.util.ReflectionUtils;
 
 public class NetUtils {
+  private static final Log LOG = LogFactory.getLog(NetUtils.class);
 
   /**
    * Get the socket factory for the given class according to its
@@ -120,5 +123,45 @@
     }
   
     return new InetSocketAddress(hostname, port);
+  }
+
+  /**
+   * Handle the transition from pairs of attributes specifying a host and port
+   * to a single colon separated one.
+   * @param conf the configuration to check
+   * @param oldBindAddressName the old address attribute name
+   * @param oldPortName the old port attribute name
+   * @param newBindAddressName the new combined name
+   * @return the complete address from the configuration
+   */
+  @Deprecated
+  public static String getServerAddress(Configuration conf,
+                                        String oldBindAddressName,
+                                        String oldPortName,
+                                        String newBindAddressName) {
+    String oldAddr = conf.get(oldBindAddressName);
+    String oldPort = conf.get(oldPortName);
+    String newAddrPort = conf.get(newBindAddressName);
+    if (oldAddr == null && oldPort == null) {
+      return newAddrPort;
+    }
+    String[] newAddrPortParts = newAddrPort.split(":",2);
+    if (newAddrPortParts.length != 2) {
+      throw new IllegalArgumentException("Invalid address/port: " + 
+                                         newAddrPort);
+    }
+    if (oldAddr == null) {
+      oldAddr = newAddrPortParts[0];
+    } else {
+      LOG.warn("Configuration parameter " + oldBindAddressName +
+               " is deprecated. Use " + newBindAddressName + " instead.");
+    }
+    if (oldPort == null) {
+      oldPort = newAddrPortParts[1];
+    } else {
+      LOG.warn("Configuration parameter " + oldPortName +
+               " is deprecated. Use " + newBindAddressName + " instead.");      
+    }
+    return oldAddr + ":" + oldPort;
   }
 }

Modified: hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/MiniDFSCluster.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/MiniDFSCluster.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/MiniDFSCluster.java (original)
+++ hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/MiniDFSCluster.java Wed
Jan 30 13:07:34 2008
@@ -168,7 +168,7 @@
     
     // Setup the NameNode configuration
     conf.set("fs.default.name", "localhost:"+ Integer.toString(nameNodePort));
-    conf.set("dfs.http.bindAddress", "0.0.0.0:0");  
+    conf.set("dfs.http.address", "0.0.0.0:0");  
     if (manageDfsDirs) {
       conf.set("dfs.name.dir", new File(base_dir, "name1").getPath()+","+
                new File(base_dir, "name2").getPath());
@@ -262,8 +262,8 @@
     }
 
     // Set up the right ports for the datanodes
-    conf.set("dfs.datanode.bindAddress", "0.0.0.0:0");
-    conf.set("dfs.datanode.http.bindAddress", "0.0.0.0:0");
+    conf.set("dfs.datanode.address", "0.0.0.0:0");
+    conf.set("dfs.datanode.http.address", "0.0.0.0:0");
     
     String[] args = (operation == null ||
                      operation == StartupOption.FORMAT ||

Modified: hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestCheckpoint.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestCheckpoint.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestCheckpoint.java (original)
+++ hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestCheckpoint.java Wed
Jan 30 13:07:34 2008
@@ -331,7 +331,7 @@
     Collection<File> namedirs = null;
 
     Configuration conf = new Configuration();
-    conf.set("dfs.secondary.http.bindAddress", "0.0.0.0:0");
+    conf.set("dfs.secondary.http.address", "0.0.0.0:0");
     replication = (short)conf.getInt("dfs.replication", 3);  
     MiniDFSCluster cluster = new MiniDFSCluster(conf, numDatanodes, true, null);
     cluster.waitActive();

Modified: hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestHDFSServerPorts.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestHDFSServerPorts.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestHDFSServerPorts.java
(original)
+++ hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/dfs/TestHDFSServerPorts.java
Wed Jan 30 13:07:34 2008
@@ -54,7 +54,7 @@
     config = new Configuration();
     config.set("dfs.name.dir", new File(hdfsDir, "name1").getPath());
     config.set("fs.default.name", NAME_NODE_HOST + "0");
-    config.set("dfs.http.bindAddress", NAME_NODE_HTTP_HOST + "0");
+    config.set("dfs.http.address", NAME_NODE_HTTP_HOST + "0");
     NameNode.format(config);
 
     String[] args = new String[] {};
@@ -144,7 +144,7 @@
       // reset conf2 since NameNode modifies it
       conf2.set("fs.default.name", NAME_NODE_HOST + "0");
       // different http port
-      conf2.set("dfs.http.bindAddress", NAME_NODE_HTTP_HOST + "0");
+      conf2.set("dfs.http.address", NAME_NODE_HTTP_HOST + "0");
       started = canStartNameNode(conf2);
       assertTrue(started); // should start now
     } finally {
@@ -163,20 +163,21 @@
       // start data-node on the same port as name-node
       Configuration conf2 = new Configuration(config);
       conf2.set("dfs.data.dir", new File(hdfsDir, "data").getPath());
-      conf2.set("dfs.datanode.bindAddress", config.get("fs.default.name"));
-      conf2.set("dfs.datanode.http.bindAddress", NAME_NODE_HTTP_HOST + "0");
+      conf2.set("dfs.datanode.address", config.get("fs.default.name"));
+      conf2.set("dfs.datanode.http.address", NAME_NODE_HTTP_HOST + "0");
       boolean started = canStartDataNode(conf2);
       assertFalse(started); // should fail
 
       // bind http server to the same port as name-node
-      conf2.set("dfs.datanode.bindAddress", NAME_NODE_HOST + "0");
-      conf2.set("dfs.datanode.http.bindAddress", config.get("dfs.http.bindAddress"));
+      conf2.set("dfs.datanode.address", NAME_NODE_HOST + "0");
+      conf2.set("dfs.datanode.http.address", 
+                config.get("dfs.http.address"));
       started = canStartDataNode(conf2);
       assertFalse(started); // should fail
     
       // both ports are different from the name-node ones
-      conf2.set("dfs.datanode.bindAddress", NAME_NODE_HOST + "0");
-      conf2.set("dfs.datanode.http.bindAddress", NAME_NODE_HTTP_HOST + "0");
+      conf2.set("dfs.datanode.address", NAME_NODE_HOST + "0");
+      conf2.set("dfs.datanode.http.address", NAME_NODE_HTTP_HOST + "0");
       started = canStartDataNode(conf2);
       assertTrue(started); // should start now
     } finally {
@@ -194,14 +195,17 @@
 
       // bind http server to the same port as name-node
       Configuration conf2 = new Configuration(config);
-      conf2.set("dfs.secondary.http.bindAddress", config.get("dfs.http.bindAddress"));
-      SecondaryNameNode.LOG.info("= Starting 1 on: " + conf2.get("dfs.secondary.http.bindAddress"));
+      conf2.set("dfs.secondary.http.address", 
+                config.get("dfs.http.address"));
+      SecondaryNameNode.LOG.info("= Starting 1 on: " + 
+                                 conf2.get("dfs.secondary.http.address"));
       boolean started = canStartSecondaryNode(conf2);
       assertFalse(started); // should fail
 
       // bind http server to a different port
-      conf2.set("dfs.secondary.http.bindAddress", NAME_NODE_HTTP_HOST + "0");
-      SecondaryNameNode.LOG.info("= Starting 2 on: " + conf2.get("dfs.secondary.http.bindAddress"));
+      conf2.set("dfs.secondary.http.address", NAME_NODE_HTTP_HOST + "0");
+      SecondaryNameNode.LOG.info("= Starting 2 on: " + 
+                                 conf2.get("dfs.secondary.http.address"));
       started = canStartSecondaryNode(conf2);
       assertTrue(started); // should start now
     } finally {

Modified: hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/MiniMRCluster.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/MiniMRCluster.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/MiniMRCluster.java
(original)
+++ hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/MiniMRCluster.java
Wed Jan 30 13:07:34 2008
@@ -109,8 +109,8 @@
       this.numDir = numDir;
       localDirs = new String[numDir];
       conf = createJobConf();
-      conf.set("mapred.task.tracker.http.bindAddress", "0.0.0.0:0");
-      conf.set("mapred.task.tracker.report.bindAddress", 
+      conf.set("mapred.task.tracker.http.address", "0.0.0.0:0");
+      conf.set("mapred.task.tracker.report.address", 
                 "127.0.0.1:" + taskTrackerPort);
       File localDirBase = 
         new File(conf.get("mapred.local.dir")).getAbsoluteFile();
@@ -225,7 +225,7 @@
     JobConf result = new JobConf();
     result.set("fs.default.name", namenode);
     result.set("mapred.job.tracker", "localhost:"+jobTrackerPort);
-    result.set("mapred.job.tracker.http.bindAddress", 
+    result.set("mapred.job.tracker.http.address", 
                         "0.0.0.0:" + jobTrackerInfoPort);
     // for debugging have all task output sent to the test output
     JobClient.setTaskOutputFilter(result, JobClient.TaskStatusFilter.ALL);

Modified: hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java?rev=616904&r1=616903&r2=616904&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java
(original)
+++ hadoop/core/branches/branch-0.16/src/test/org/apache/hadoop/mapred/TestMRServerPorts.java
Wed Jan 30 13:07:34 2008
@@ -41,12 +41,12 @@
   private JobTracker startJobTracker(JobConf conf) 
   throws IOException {
     conf.set("mapred.job.tracker", "localhost:0");
-    conf.set("mapred.job.tracker.http.bindAddress", "0.0.0.0:0");
+    conf.set("mapred.job.tracker.http.address", "0.0.0.0:0");
     JobTracker jt = null;
     try {
       jt = JobTracker.startTracker(conf);
       conf.set("mapred.job.tracker", "localhost:" + jt.getTrackerPort());
-      conf.set("mapred.job.tracker.http.bindAddress", 
+      conf.set("mapred.job.tracker.http.address", 
                             "0.0.0.0:" + jt.getInfoPort());
     } catch(InterruptedException e) {
       throw new IOException(e.getLocalizedMessage());
@@ -100,21 +100,21 @@
       // start job tracker on the same port as name-node
       JobConf conf2 = new JobConf(hdfs.getConfig());
       conf2.set("mapred.job.tracker", hdfs.getConfig().get("fs.default.name"));
-      conf2.set("mapred.job.tracker.http.bindAddress",
+      conf2.set("mapred.job.tracker.http.address",
         TestHDFSServerPorts.NAME_NODE_HTTP_HOST + 0);
       boolean started = canStartJobTracker(conf2);
       assertFalse(started); // should fail
 
       // bind http server to the same port as name-node
       conf2.set("mapred.job.tracker", TestHDFSServerPorts.NAME_NODE_HOST + 0);
-      conf2.set("mapred.job.tracker.http.bindAddress",
-        hdfs.getConfig().get("dfs.http.bindAddress"));
+      conf2.set("mapred.job.tracker.http.address",
+        hdfs.getConfig().get("dfs.http.address"));
       started = canStartJobTracker(conf2);
       assertFalse(started); // should fail again
 
       // both ports are different from the name-node ones
       conf2.set("mapred.job.tracker", TestHDFSServerPorts.NAME_NODE_HOST + 0);
-      conf2.set("mapred.job.tracker.http.bindAddress",
+      conf2.set("mapred.job.tracker.http.address",
         TestHDFSServerPorts.NAME_NODE_HTTP_HOST + 0);
       started = canStartJobTracker(conf2);
       assertTrue(started); // should start now
@@ -137,25 +137,25 @@
       jt = startJobTracker(conf2);
 
       // start job tracker on the same port as name-node
-      conf2.set("mapred.task.tracker.report.bindAddress",
+      conf2.set("mapred.task.tracker.report.address",
         hdfs.getConfig().get("fs.default.name"));
-      conf2.set("mapred.task.tracker.http.bindAddress",
+      conf2.set("mapred.task.tracker.http.address",
         TestHDFSServerPorts.NAME_NODE_HTTP_HOST + 0);
       boolean started = canStartTaskTracker(conf2);
       assertFalse(started); // should fail
 
       // bind http server to the same port as name-node
-      conf2.set("mapred.task.tracker.report.bindAddress",
+      conf2.set("mapred.task.tracker.report.address",
         TestHDFSServerPorts.NAME_NODE_HOST + 0);
-      conf2.set("mapred.task.tracker.http.bindAddress",
-        hdfs.getConfig().get("dfs.http.bindAddress"));
+      conf2.set("mapred.task.tracker.http.address",
+        hdfs.getConfig().get("dfs.http.address"));
       started = canStartTaskTracker(conf2);
       assertFalse(started); // should fail again
 
       // both ports are different from the name-node ones
-      conf2.set("mapred.task.tracker.report.bindAddress",
+      conf2.set("mapred.task.tracker.report.address",
         TestHDFSServerPorts.NAME_NODE_HOST + 0);
-      conf2.set("mapred.task.tracker.http.bindAddress",
+      conf2.set("mapred.task.tracker.http.address",
         TestHDFSServerPorts.NAME_NODE_HTTP_HOST + 0);
       started = canStartTaskTracker(conf2);
       assertTrue(started); // should start now



Mime
View raw message