hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r633965 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSImage.java src/test/org/apache/hadoop/dfs/TestFileCreation.java
Date Wed, 05 Mar 2008 18:34:41 GMT
Author: dhruba
Date: Wed Mar  5 10:34:38 2008
New Revision: 633965

URL: http://svn.apache.org/viewvc?rev=633965&view=rev
Log:
HADOOP-2934. The namenode was encountreing a NPE while loading
leases from the fsimage. Fixed. (dhruba)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java
    hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestFileCreation.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=633965&r1=633964&r2=633965&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Wed Mar  5 10:34:38 2008
@@ -137,6 +137,9 @@
     HADOOP-2821. Removes deprecated ShellUtil and ToolBase classes from
     the util package. (Amareshwari Sri Ramadasu via ddas) 
 
+    HADOOP-2934. The namenode was encountreing a NPE while loading
+    leases from the fsimage. Fixed. (dhruba)
+
 Release 0.16.1 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java?rev=633965&r1=633964&r2=633965&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/dfs/FSImage.java Wed Mar  5 10:34:38 2008
@@ -946,10 +946,11 @@
     long preferredBlockSize = in.readLong();
     int numBlocks = in.readInt();
     BlockInfo[] blocks = new BlockInfo[numBlocks];
+    Block blk = new Block();
     for (int i = 0; i < numBlocks; i++) {
-      blocks[i].readFields(in);
+      blk.readFields(in);
+      blocks[i] = new BlockInfo(blk, blockReplication);
     }
-
     PermissionStatus perm = PermissionStatus.read(in);
     UTF8 clientName = new UTF8();
     clientName.readFields(in);
@@ -959,6 +960,7 @@
     int numLocs = in.readInt();
     DatanodeDescriptor[] locations = new DatanodeDescriptor[numLocs];
     for (int i = 0; i < numLocs; i++) {
+      locations[i] = new DatanodeDescriptor();
       locations[i].readFields(in);
     }
 

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestFileCreation.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestFileCreation.java?rev=633965&r1=633964&r2=633965&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestFileCreation.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestFileCreation.java Wed Mar  5 10:34:38
2008
@@ -357,6 +357,7 @@
       System.out.println("testFileCreationNamenodeRestart: "
                          + "Created file filestatus.dat with one "
                          + " replicas.");
+      writeFile(stm);
 
       // create another new file.
       //



Mime
View raw message