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

Jing Zhao commented on HDFS-4481:
---------------------------------

The patch looks good to me. Some of my thoughts:

1. AbstractINodeDiff#Factory needs some javadoc. Also we need more description 
for the javadoc of its methods. 

2. createSnapshotCopyOfCurrentINode(N) may be renamed to createSnapshotCopy(N)?

3. In INodeDirectoryWithSnapshot#combinePosteriorAndCollectBlocks, calling 
inode.destroySubtreeAndCollectBlocks(posterior.snapshot,
collectedBlocks) may have some bug: we need to destroy the whole subtree in 
some special cases. Also, when deleting a directory while a snapshot has been 
taken, the current code destroys the subtree when processing an INodeDirectory. 
We need to revisit the whole deletion process. We can fix it in HDFS-4487 
and/or later jiras.

4. We need to update the javadoc of FSImageFormat, as well as the new methods 
in SnapshotFSImageFormat.

5. INodeFile#setFileReplication, miss a return after 
"nodeToUpdate.setFileReplication(replication, null);"

7. AbstractINodeDiff#checkAndInitINode can now be renamed to 
checkAndSaveSnapshotCopy.
                
> Fix snapshot fsimage for file diffs
> -----------------------------------
>
>                 Key: HDFS-4481
>                 URL: https://issues.apache.org/jira/browse/HDFS-4481
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h4481_20130209.patch, h4481_20130210.patch, 
> h4481_20130211.patch
>
>
> HDFS-4446 and HDFS-4480 add file diffs and eliminate the file circular linked 
> list.  We should fix snapshot diff report and fsimage accordingly.

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