hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r480730 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/DataNode.java
Date Wed, 29 Nov 2006 22:08:18 GMT
Author: cutting
Date: Wed Nov 29 14:08:17 2006
New Revision: 480730

URL: http://svn.apache.org/viewvc?view=rev&rev=480730
Log:
HADOOP-430.  Stop datanode's HTTP server when registration with namenode fails.  Contributed
by Wendy.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=480730&r1=480729&r2=480730
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Nov 29 14:08:17 2006
@@ -140,6 +140,9 @@
 41. HADOOP-689. Add GenericWritable, to facilitate polymorphism in
     MapReduce, SequenceFile, etc. (Feng Jiang via cutting)
 
+42. HADOOP-430.  Stop datanode's HTTP server when registration with
+    namenode fails.  (Wendy Chien via cutting)
+
 
 Release 0.8.0 - 2006-11-03
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java?view=diff&rev=480730&r1=480729&r2=480730
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DataNode.java Wed Nov 29 14:08:17 2006
@@ -166,7 +166,15 @@
         this.infoServer.start();
         this.dnRegistration.infoPort = this.infoServer.getPort();
         // register datanode
-        register();
+        try {
+          register();
+        } catch (IOException ie) {
+          try {
+            infoServer.stop();
+          } catch (Exception e) {
+          }
+          throw ie;
+        }
         datanodeObject = this;
     }
     



Mime
View raw message