hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r642035 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/NamenodeFsck.java
Date Thu, 27 Mar 2008 23:59:14 GMT
Author: dhruba
Date: Thu Mar 27 16:59:12 2008
New Revision: 642035

URL: http://svn.apache.org/viewvc?rev=642035&view=rev
Log:
HADOOP-3107. Fix NPE when fsck invokes getListings. (dhruba)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NamenodeFsck.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=642035&r1=642034&r2=642035&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Mar 27 16:59:12 2008
@@ -444,6 +444,8 @@
     HADOOP-3084. Fix HftpFileSystem to work for zero-lenghth files.
     (cdouglas)
 
+    HADOOP-3107. Fix NPE when fsck invokes getListings. (dhruba)
+
 Release 0.16.1 - 2008-03-13
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NamenodeFsck.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NamenodeFsck.java?rev=642035&r1=642034&r2=642035&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NamenodeFsck.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/NamenodeFsck.java Thu Mar 27 16:59:12
2008
@@ -144,11 +144,14 @@
     String path = file.getPath().toString();
 
     if (file.isDir()) {
+      DFSFileInfo[] files = nn.namesystem.dir.getListing(path);
+      if (files == null) {
+        return;
+      }
       if (showFiles) {
         out.println(path + " <dir>");
       }
       res.totalDirs++;
-      DFSFileInfo[] files = nn.namesystem.dir.getListing(path);
       for (int i = 0; i < files.length; i++) {
         check(files[i], res);
       }



Mime
View raw message