Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.17.0
-
None
-
None
Description
André Martin reported on core-user mailing list :
[...] 2008-03-02 01:25:29,887 ERROR org.apache.hadoop.dfs.NameNode: java.lang.NullPointerException at org.apache.hadoop.dfs.FSImage.readINodeUnderConstruction(FSImage.java:950) at org.apache.hadoop.dfs.FSImage.loadFilesUnderConstruction(FSImage.java:919) at org.apache.hadoop.dfs.FSImage.loadFSImage(FSImage.java:749) at org.apache.hadoop.dfs.FSImage.loadFSImage(FSImage.java:634) at org.apache.hadoop.dfs.FSImage.recoverTransitionRead(FSImage.java:223) at org.apache.hadoop.dfs.FSDirectory.loadFSImage(FSDirectory.java:79) at org.apache.hadoop.dfs.FSNamesystem.initialize(FSNamesystem.java:261) at org.apache.hadoop.dfs.FSNamesystem.<init>(FSNamesystem.java:242) at org.apache.hadoop.dfs.NameNode.initialize(NameNode.java:131) at org.apache.hadoop.dfs.NameNode.<init>(NameNode.java:176) at org.apache.hadoop.dfs.NameNode.<init>(NameNode.java:162) at org.apache.hadoop.dfs.NameNode.createNameNode(NameNode.java:851) at org.apache.hadoop.dfs.NameNode.main(NameNode.java:860)
Block object should be allocated before calling readFields() in FSImage.java :
BlockInfo[] blocks = new BlockInfo[numBlocks]; for (int i = 0; i < numBlocks; i++) { blocks[i].readFields(in); }