hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jing Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-4813) BlocksMap may throw NullPointerException during shutdown
Date Wed, 15 May 2013 00:06:13 GMT

     [ https://issues.apache.org/jira/browse/HDFS-4813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jing Zhao updated HDFS-4813:
----------------------------

    Attachment: HDFS-4813.002.patch

Seems we still need to set blocks to null in order to release memory when closing the BlocksMap.
To guarantee the replication thread can see the change (i.e., null to non-null) of BlocksMap#blocks,
we may add the volatile keyword instead of final.
                
> BlocksMap may throw NullPointerException during shutdown
> --------------------------------------------------------
>
>                 Key: HDFS-4813
>                 URL: https://issues.apache.org/jira/browse/HDFS-4813
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.0.0
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Jing Zhao
>            Priority: Minor
>         Attachments: HDFS-4813.001.patch, HDFS-4813.002.patch
>
>
> TestBlocksWithNotEnoughRacks may fail occasionally due to the bug:
> {noformat}
> java.lang.AssertionError: Test resulted in an unexpected exit
> 	at org.apache.hadoop.hdfs.MiniDFSCluster.shutdown(MiniDFSCluster.java:1416)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.TestBlocksWithNotEnoughRacks.__CLR3_0_226e5kj1ntz(TestBlocksWithNotEnoughRacks.java:373)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.TestBlocksWithNotEnoughRacks.testReduceReplFactorDueToRejoinRespectsRackPolicy(TestBlocksWithNotEnoughRacks.java:330)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	...
> {noformat}
> At the end of the log:
> {noformat}
> 2013-05-10 13:05:53,828 FATAL hdfs.MiniDFSCluster (MiniDFSCluster.java:shutdown(1413))
- Test resulted in an unexpected exit
> org.apache.hadoop.util.ExitUtil$ExitException: java.lang.NullPointerException
> 	at org.apache.hadoop.hdfs.server.blockmanagement.BlocksMap.getBlockCollection(BlocksMap.java:77)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.computeReplicationWorkForBlocks(BlockManager.java:1153)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.computeReplicationWork(BlockManager.java:1128)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.computeDatanodeWork(BlockManager.java:3127)
> 	at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager$ReplicationMonitor.run(BlockManager.java:3089)
> 	at java.lang.Thread.run(Thread.java:662)
> 	...
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message