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

Andrew Wang commented on HDFS-5709:
-----------------------------------

I had a quick call with Suresh to hash this out, and we arrived at the 
following which should be suitable for everyone:

* Rather than a configuration option which can stick around forever, an 
additional command line flag (e.g. "-upgrade -renameReserved") is better. This 
way we worry about it once, and there are no lingering effects.
* We default to renaming reserved paths to a convention like 
{{.snapshot.LV.UPGRADE_RENAMED}}, but also allow users to pass key/value pairs 
on the command line, e.g. "-upgrade -renameReserved .snapshot=.user-snapshot". 
In either case, we should do our best to detect collisions, but it's hard with 
the edit log.
* It'd be good to do this for "/.reserved" too, which will help demonstrate 
that this is a generic solution.

I think this is an accurate summary, so I'll start revving the patch as per 
above. Please comment if something is still off.

> Improve upgrade with existing files and directories named ".snapshot"
> ---------------------------------------------------------------------
>
>                 Key: HDFS-5709
>                 URL: https://issues.apache.org/jira/browse/HDFS-5709
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 3.0.0, 2.2.0
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>              Labels: snapshots, upgrade
>         Attachments: hdfs-5709-1.patch, hdfs-5709-2.patch, hdfs-5709-3.patch, 
> hdfs-5709-4.patch, hdfs-5709-5.patch
>
>
> Right now in trunk, upgrade fails messily if the old fsimage or edits refer 
> to a directory named ".snapshot". We should at least print a better error 
> message (which I believe was the original intention in HDFS-4666), and [~atm] 
> proposed automatically renaming these files and directories.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to