[
https://issues.apache.org/jira/browse/HDFS-4167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13988708#comment-13988708
]
Tsz Wo Nicholas Sze commented on HDFS-4167:
-------------------------------------------
Some other comments:
- It seems that the implementation does not support restoring a deleted file.
For example, if /foo/.snapshot/s0/bar is a file in snapshot s0 and /foo/bar is
deleted, then fs.restoreSnapshot(/foo/bar, /foo, s0) will fail since the INode
of /foo/bar cannot be found.
- For the new FileSystem API restoreSnapshot(Path restorePath, Path
snapshotRoot, String snapshotName), I think restorePath should be a relative
path to the snapshot and we should reorder the parameter to snapshotRoot,
snapshotName, restorePath (continue with the previous example,
fs.restoreSnapshot(/foo, s0, bar)) or simple combine them to a snapshot path,
i.e. fs.restoreSnapshot(/foo/.snapshot/s0/bar).
- Let's throw SnapshotException instead of IOException for the snapshot related
exceptions.
- In INodeDirectory.restoreChildrenList, use Collections.<INode>emptyList().
> 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
> Reporter: Suresh Srinivas
> Assignee: Jing Zhao
> Attachments: HDFS-4167.000.patch, HDFS-4167.001.patch,
> HDFS-4167.002.patch, HDFS-4167.003.patch
>
>
> This jira tracks work related to restoring a directory/file to a snapshot.
--
This message was sent by Atlassian JIRA
(v6.2#6252)