hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r764967 - in /hadoop/core/trunk: CHANGES.txt src/test/org/apache/hadoop/hdfs/server/namenode/TestReplicationPolicy.java
Date Tue, 14 Apr 2009 21:40:29 GMT
Author: hairong
Date: Tue Apr 14 21:40:28 2009
New Revision: 764967

URL: http://svn.apache.org/viewvc?rev=764967&view=rev
Log:
HADOOP-5654. TestReplicationPolicy.<init> fails on java.net.BindException. Contributed
by Hairong Kuang.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestReplicationPolicy.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=764967&r1=764966&r2=764967&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Tue Apr 14 21:40:28 2009
@@ -1233,6 +1233,9 @@
     HADOOP-5645. After HADOOP-4920 we need a place to checkin
     releasenotes.html. (nigel)
 
+    HADOOP-5654. TestReplicationPolicy.<init> fails on java.net.BindException.
+    (hairong)
+
 Release 0.19.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestReplicationPolicy.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestReplicationPolicy.java?rev=764967&r1=764966&r2=764967&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestReplicationPolicy.java
(original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestReplicationPolicy.java
Tue Apr 14 21:40:28 2009
@@ -36,9 +36,9 @@
   private static final int NUM_OF_DATANODES = 6;
   private static final Configuration CONF = new Configuration();
   private static final NetworkTopology cluster;
-  private static NameNode namenode;
-  private static ReplicationTargetChooser replicator;
-  private static DatanodeDescriptor dataNodes[] = 
+  private static final NameNode namenode;
+  private static final ReplicationTargetChooser replicator;
+  private static final DatanodeDescriptor dataNodes[] = 
     new DatanodeDescriptor[] {
       new DatanodeDescriptor(new DatanodeID("h1:5020"), "/d1/r1"),
       new DatanodeDescriptor(new DatanodeID("h2:5020"), "/d1/r1"),
@@ -54,11 +54,12 @@
   static {
     try {
       FileSystem.setDefaultUri(CONF, "hdfs://localhost:0");
+      CONF.set("dfs.http.address", "0.0.0.0:0");
       NameNode.format(CONF);
       namenode = new NameNode(CONF);
     } catch (IOException e) {
-      // TODO Auto-generated catch block
       e.printStackTrace();
+      throw (RuntimeException)new RuntimeException().initCause(e);
     }
     FSNamesystem fsNamesystem = namenode.getNamesystem();
     replicator = fsNamesystem.replicator;



Mime
View raw message