hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r580871 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Mon, 01 Oct 2007 07:03:08 GMT
Author: dhruba
Date: Mon Oct  1 00:03:07 2007
New Revision: 580871

URL: http://svn.apache.org/viewvc?rev=580871&view=rev
Log:
HADOOP-1935. Fix a NullPointerException in internalReleaseCreate.
(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?rev=580871&r1=580870&r2=580871&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Oct  1 00:03:07 2007
@@ -94,6 +94,9 @@
 
   BUG FIXES
 
+    HADOOP-1935. Fix a NullPointerException in internalReleaseCreate.
+    (Dhruba Borthakur)
+
     HADOOP-1933. The nodes listed in include and exclude files 
     are always listed in the datanode report.
     (Raghu Angadi via dhruba)

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?rev=580871&r1=580870&r2=580871&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Mon Oct  1 00:03:07
2007
@@ -1487,6 +1487,13 @@
   private void internalReleaseCreate(String src, String holder) throws IOException {
     INodeFileUnderConstruction pendingFile = (INodeFileUnderConstruction) dir.getFileINode(src);
 
+    if (pendingFile == null) {
+      NameNode.stateChangeLog.warn("DIR* NameSystem.internalReleaseCreate: "
+                                   + "attempt to release a create lock on "
+                                   + src + " file does not exist.");
+      return;
+    }
+
     // The last block that was allocated migth not have been used by the
     // client. In this case, the size of the last block would be 0. A fsck
     // will report this block as a missing block because no datanodes have it.



Mime
View raw message