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

Suresh Srinivas commented on HDFS-4103:
---------------------------------------

Some more comments for InodeDirectoryWithSnapshot.java:
# SnapshotDiff class
#* A detailed javadoc for the class would be very useful. A nice ascii diagram 
would be even better :-)
#* SnapshotDiff#size could be named childrenSize? Also should we indicate it is 
the size of children list when snapshot was created?
#* "The snapshot will obtain after applied this diff" this does not read 
correctly.
#* "Posterior diff is the diff happened after this diff" - shoudl it be "after 
this snapshot"
#* Should the javadoc indiciate - the snapshot state of this snapshot = 
(current state) + all the posterior diffs over the current state?
# Javadoc for many of the InodeDirectoryWithSnapshot methods added in this 
change would be good

                
> Support O(1) snapshot creation
> ------------------------------
>
>                 Key: HDFS-4103
>                 URL: https://issues.apache.org/jira/browse/HDFS-4103
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: Snapshot (HDFS-2802)
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h4103_20121129.patch, h4103_20121202.patch
>
>
> In our first snapshot implementation, snapshot creation runs in O(N) and 
> occupies O(N) memory space, where N = # files + # directories + # symlinks in 
> the snapshot.  The advantages of the implementation are that there is no 
> additional cost for the modifications after snapshots are created, and it 
> leads to a simple implementation.
> In this JIRA, we optimize snapshot creation to O(1) although it introduces 
> additional cost in the modifications after snapshots are created.  Note that 
> the INode is given as an assumption, otherwise, there is a non-constant cost 
> to find the INode.

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