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

Aaron T. Myers updated HDFS-3678:
---------------------------------

    Attachment: HDFS-3678.patch

Here's a patch which addresses the issue. This works by adding a generic edit 
log purging interface, which FSEditLog implements on the NN side, and a new 
inner class in the 2NN which also implements it in a way that's specific to the 
2NN. NNStorageRetentionManager is augmented to take a reference to this 
interface, instead of to the FSEditLog concrete type.

In addition to the test provided here, I also tested this patch manually and 
observed that the NPE is gone from the 2NN logs, and that 2NN edit log files 
are purged appropriately from a pseudo cluster.
                
> Edit log files are never being purged from 2NN
> ----------------------------------------------
>
>                 Key: HDFS-3678
>                 URL: https://issues.apache.org/jira/browse/HDFS-3678
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 3.0.0
>            Reporter: Todd Lipcon
>            Assignee: Aaron T. Myers
>            Priority: Critical
>         Attachments: HDFS-3678.patch
>
>
> Seeing the following NPE in the SecondaryNameNode when it tries to purge 
> storage after a checkpoint:
> 12/07/17 19:05:22 WARN namenode.FSImage: Unable to purge old storage
> java.lang.NullPointerException
>         at 
> org.apache.hadoop.hdfs.server.namenode.FSEditLog.purgeLogsOlderThan(FSEditLog.java:1013)
>         at 
> org.apache.hadoop.hdfs.server.namenode.NNStorageRetentionManager.purgeOldStorage(NNStorageRetentionManager.java:98)
>         at 
> org.apache.hadoop.hdfs.server.namenode.FSImage.purgeOldStorage(FSImage.java:925)
>         at 
> org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.doCheckpoint(SecondaryNameNode.java:479)

--
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

        

Reply via email to