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

Andrew Wang updated HDFS-5709:
------------------------------

    Attachment: hdfs-5709-1.patch

Binary patch attached. High-level notes:

* I went with a full-substitution for reserved path components with the new 
configuration option, with the understanding that ".user-snapshot" is a 
prettier format. By default, this is null and will make the user set it if we 
encounter a .snapshot path during upgrade.
* Should be easy to extend if we ever have add more reserved paths. I went 
through and munged all the edit log ops except the cache directive ones; I 
think these are okay to skip since they won't prevent the NN from starting up, 
but I can do them too if desired.
* It's hard to check that the destination of the rename is safe, so I don't. 
The issue is if we rename something to {{.user-snapshot}} and the edit log 
later touchz's or mkdirs {{.user-snapshot}}. We could check for 
{{.user-snapshot}} in all paths flying by, but then we'd be precluding that 
from being used anywhere in the namespace, not just where it might collide in 
later edit log ops.
* New test and provided tarball have an image and edits that refer to 
".snapshot" paths. I did a variety of touch and mkdir operations.

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