hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r642036 - in /hadoop/core/branches/branch-0.16: CHANGES.txt src/java/org/apache/hadoop/dfs/NamenodeFsck.java
Date Fri, 28 Mar 2008 00:00:32 GMT
Author: dhruba
Date: Thu Mar 27 17:00:24 2008
New Revision: 642036

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


Modified:
    hadoop/core/branches/branch-0.16/CHANGES.txt
    hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/NamenodeFsck.java

Modified: hadoop/core/branches/branch-0.16/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/CHANGES.txt?rev=642036&r1=642035&r2=642036&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.16/CHANGES.txt Thu Mar 27 17:00:24 2008
@@ -49,6 +49,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/branches/branch-0.16/src/java/org/apache/hadoop/dfs/NamenodeFsck.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/NamenodeFsck.java?rev=642036&r1=642035&r2=642036&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/NamenodeFsck.java (original)
+++ hadoop/core/branches/branch-0.16/src/java/org/apache/hadoop/dfs/NamenodeFsck.java Thu
Mar 27 17:00:24 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