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

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

New patch attached.

* New flag {{-renameReserved [kv-pairs]}} can be specified with {{-upgrade}} to 
do auto renaming. We support both the default of 
{{.reserved.LV.UPGRADE_RENAMED}}, and override with the optional kv pairs from 
the command line. The KV pairs undergo some basic validation (e.g. you can't 
set {{.reserved=.snapshot}}).
* Rename "/.reserved" too. I think this reservation was added by 
{{Feature.ADD_INODE_ID}}, please correct me if that's wrong and I'll fix it up.
* Upon encountering a reserved path, we throw a Precondition explaining the 
reserved paths and how to manually and automatically rename them.
* I beefed up the test case, which is a quick way of seeing how this works.
* Also played around manually with the test image to make sure that errors 
cases work as expected

> 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, hdfs-5709-6.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