hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jing Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5709) Improve upgrade with existing files and directories named ".snapshot"
Date Fri, 17 Jan 2014 01:02:16 GMT

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

Jing Zhao commented on HDFS-5709:
---------------------------------

The patch looks good to me. Some comments:
# In FSEditLogLoader, we also need to handle "OP_ADD_BLOCK" after HDFS-5704 got committed
recently.
# It will be better to let renameReservedPathsOnUpgrade and renameReservedComponentOnUpgrade
take a string as the third parameter instead of an instance of FSNamesystem. We may also want
to pass in the to-be-replaced string as a parameter, and in that case, we can make these two
methods act as more generic utility methods so that it can be used for other reserved names
(e.g., "/.reserved/.inodes", which we may want to handle in a separate jira). 
# Then we can have another two methods in FSImageFormat/FSEditLogLoader to call the util methods,
where we can check layoutversion and new names.
# When checking the new name, I think we should follow the rules in DFSUtil#isValidName?
# In renameReservedComponentOnUpgrade, maybe we do not need to convert the byte[] to string
for the comparison? We have DOT_SNAPSHOT_DIR_BYTES defined in HdfsConstants already.
# There is an unused import in FSImageFormat.

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

Mime
View raw message