hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r529067 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Sun, 15 Apr 2007 20:42:19 GMT
Author: tomwhite
Date: Sun Apr 15 13:42:18 2007
New Revision: 529067

URL: http://svn.apache.org/viewvc?view=rev&rev=529067
Log:
HADOOP-1241.  Fix NullPointerException in processReport when namenode is restarted.  Contributed
by Dhruba Borthakur.

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

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=529067&r1=529066&r2=529067
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Sun Apr 15 13:42:18 2007
@@ -187,6 +187,9 @@
 56. HADOOP-1239.  Add a package name to some testjar test classes.
     (Jim Kellerman via cutting)
 
+57. HADOOP-1241.  Fix NullPointerException in processReport when 
+    namenode is restarted.  (Dhruba Borthakur via tomwhite)
+
 
 Release 0.12.3 - 2007-04-06
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java?view=diff&rev=529067&r1=529066&r2=529067
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Sun Apr 15 13:42:18
2007
@@ -2093,9 +2093,15 @@
     public synchronized Block[] processReport(DatanodeID nodeID, 
                                               Block newReport[]
                                             ) throws IOException {
-        NameNode.stateChangeLog.debug("BLOCK* NameSystem.processReport: "
-          +"from "+nodeID.getName()+" "+newReport.length+" blocks" );
+        if (NameNode.stateChangeLog.isDebugEnabled()) {
+          NameNode.stateChangeLog.debug("BLOCK* NameSystem.processReport: "
+            +"from "+nodeID.getName()+" "+newReport.length+" blocks" );
+        }
         DatanodeDescriptor node = getDatanode( nodeID );
+        if (node == null) {
+          throw new IOException("ProcessReport from unregisterted node: "
+                                + nodeID.getName());
+        }
 
         // Check if this datanode should actually be shutdown instead.
         if (shouldNodeShutdown(node)) {



Mime
View raw message