hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Li (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-3415) NameNode is getting shutdown by throwing nullpointer exception when one of the layout version is different with others(Multiple storage dirs are configured)
Date Thu, 17 May 2012 23:51:15 GMT

    [ https://issues.apache.org/jira/browse/HDFS-3415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13278409#comment-13278409

Brandon Li commented on HDFS-3415:

I reproduce this problem with the following configuration:
1. set two storage directories, say dirA and dirB
2. start and then shutdown namenode 
3. change only dirB's layout version from -40 to 123.
4. start namenode and it should fail with the above NullPointerException

The problem here is:

Two storage inspectors are used in namenode, FSImagePreTransactionalStorageInspector for layout
version before -38, and FSImageTransactionalStorageInspector for -38 or anything later.

In this case, the modified storage directory happens to be the last one inspected by the namenode
in order to load image/edits. Even though it sees two layout version, it saves the last one
("123" in this case) as the storage layout version. However, it uses FSImageTransactionalStorageInspector
to get image path because dirA still has -40 and then uses FSImagePreTransactionalStorageInspector
to get edit stream. Because FSImagePreTransactionalStorageInspector can't recognize
 the file in a storage directory whose real version is newer, some references are not initialized
which eventually cause the exception.

> NameNode is getting shutdown by throwing nullpointer exception when one of the layout
version is different with others(Multiple storage dirs are configured)
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>                 Key: HDFS-3415
>                 URL: https://issues.apache.org/jira/browse/HDFS-3415
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 2.0.0, 3.0.0
>         Environment: Suse linux + jdk 1.6
>            Reporter: Brahma Reddy Battula
>            Assignee: Brandon Li
> Scenario:
> =========
> start Namenode and datanode by configuring three storage dir's for namenode
> write 10 files
> edit version file of one of the storage dir and give layout version as 123 which different
with default(-40).
> Stop namenode
> start Namenode.
> Then I am getting follwong exception...
> {noformat}
> 2012-05-13 19:01:41,483 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: Exception
in namenode join
> java.lang.NullPointerException
> 	at org.apache.hadoop.hdfs.server.namenode.NNStorage.getStorageFile(NNStorage.java:686)
> 	at org.apache.hadoop.hdfs.server.namenode.FSImagePreTransactionalStorageInspector.getEditsInStorageDir(FSImagePreTransactionalStorageInspector.java:243)
> 	at org.apache.hadoop.hdfs.server.namenode.FSImagePreTransactionalStorageInspector.getLatestEditsFiles(FSImagePreTransactionalStorageInspector.java:261)
> 	at org.apache.hadoop.hdfs.server.namenode.FSImagePreTransactionalStorageInspector.getEditLogStreams(FSImagePreTransactionalStorageInspector.java:276)
> 	at org.apache.hadoop.hdfs.server.namenode.FSImage.loadFSImage(FSImage.java:596)
> 	at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:247)
> 	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:498)
> 	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:390)
> 	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:354)
> 	at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:368)
> 	at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:402)
> 	at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:564)
> 	at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:545)
> 	at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1093)
> 	at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1151)
> 2012-05-13 19:01:41,485 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG:

> {noformat}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message