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

Vinayakumar B commented on HDFS-4167:
-------------------------------------

Hi,

Its nice to see this feature on board instead of manual restore from the 
snapshot.

I see that design document attached is in different approach than the patch 
attached. It can be confusing .. ;)

Some quick comments on the patch
1. {code}
+   * @param restoreRoot
+   *          The file/dir to restore * @param collectedBlocks blocks collected
+   *          from the descents for further block deletion/update will be added
+   *          to the given map.
{code}
should be properly formatted. collectedBlocks got mixed with restoreRoot's 
description

2. {code}
+    DirectoryWithSnapshotFeature sf = getDirectoryWithSnapshotFeature();
+    Quota.Counts delta = Quota.Counts.newInstance();
+    if (sf != null) {
+      sf.restoreSnapshot(this, restoreRoot, snapshot, collectedBlocks,
+          removedINodes);
+    }
+    return delta;
{code}
not using the return quota values from {{sf.restoreSnapshot(..)}}


3. FSDirectory.java changes could be ignored from the patch as its only 
whitespace change.

> Add support for restoring/rolling back to a snapshot
> ----------------------------------------------------
>
>                 Key: HDFS-4167
>                 URL: https://issues.apache.org/jira/browse/HDFS-4167
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: Snapshot (HDFS-2802)
>            Reporter: Suresh Srinivas
>            Assignee: Jing Zhao
>         Attachments: HDFS Design Proposal.pdf, HDFS-4167.000.patch
>
>
> This jira tracks work related to restoring a directory/file to a snapshot.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to