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

Arpit Agarwal updated HDFS-4719:
--------------------------------

    Attachment: HDFS-4719.002.patch

Updated version of the patch incorporating some feedback from [~szetszwo]

{quote}
The patch seems working -- it passes all snapshot tests.  However, it
is not easy to see whether FileDiff and FileDiffList are changed since
they are moved (we cannot see which lines are updated since all lines
are removed and then added to new files)  Could you move it back to
FileWithSnapshot for the moment?

After the patch, createSnapshotCopy(..) is always called before
AbstractINodeDiff.saveSnapshotCopy() even if snapshotINode is not
null.  When snapshotINode is not null, the object is created but not
used.  I has talked with Suresh about this and it seems not a good
idea.  If we don't always call createSnapshotCopy(..) first, I think
the Factory cannot be removed.
{quote}

I moved FileDiff back to FileWithSnapshot and removed the unnecessary call to 
createSnapshotCopy. FileDiffList remains in its own file since it now has 
knowledge of INodeFileUnderConstructionWithSnapshot so it seems inappropriate 
to leave it under FileWithSnapshot.
                
> Minor simplifications to snapshot code
> --------------------------------------
>
>                 Key: HDFS-4719
>                 URL: https://issues.apache.org/jira/browse/HDFS-4719
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: Snapshot (HDFS-2802)
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>             Fix For: Snapshot (HDFS-2802)
>
>         Attachments: HDFS-4719.002.patch
>
>
> Remove couple of unused snapshot functions and factor away the factory 
> classes.

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