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

Jing Zhao updated HDFS-4627:
----------------------------

    Description: 
1. Currently FSImageFormat#Loader#loadFilesUnderConstruction calls 
FSDirectory#unprotectedReplaceINodeFile without acquiring FSDirectory's lock. 
FSDirectory#replaceINodeFile should be called instead.
2. Currently FSImage#Loader#loadINode does not create block[] object (i.e., 
keep it as null) when the length of the block is 0. This will cause NPE when 
the loaded INodeFile is empty, and then an append operation on this inode is 
applied from edit log.

  was:Currently FSImageFormat#Loader#loadFilesUnderConstruction calls 
FSDirectory#unprotectedReplaceINodeFile without acquiring FSDirectory's lock. 
FSDirectory#replaceINodeFile should be called instead.

    
> Fix FSImageFormat#Loader
> ------------------------
>
>                 Key: HDFS-4627
>                 URL: https://issues.apache.org/jira/browse/HDFS-4627
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: HDFS-4627.001.patch
>
>
> 1. Currently FSImageFormat#Loader#loadFilesUnderConstruction calls 
> FSDirectory#unprotectedReplaceINodeFile without acquiring FSDirectory's lock. 
> FSDirectory#replaceINodeFile should be called instead.
> 2. Currently FSImage#Loader#loadINode does not create block[] object (i.e., 
> keep it as null) when the length of the block is 0. This will cause NPE when 
> the loaded INodeFile is empty, and then an append operation on this inode is 
> applied from edit log.

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

Reply via email to