hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11481) hdfs snapshotDiff /.reserved/raw/... fails on snapshottable directories
Date Thu, 16 Mar 2017 00:44:41 GMT

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

Andrew Wang commented on HDFS-11481:
------------------------------------

Thanks for working on this Mavin,

I refreshed myself a bit on this code. Looks like we pass a {{String path}} into a few SnapshotManager
methods: {{setSnapshottable}} but also {{resetSnapshottable}} (which likely needs to be fixed
too). These then call {{getInodesInPath}} which does not resolve reserved paths.

However, {{resolvePath}} does resolve reserved paths . I made this little change and the unit
tests still passed:

{code}
    //path = getPathWithoutReservedRaw(path);
    final INodesInPath iip = fsdir.resolvePath(null, path, DirOp.WRITE);
    //final INodesInPath iip = fsdir.getINodesInPath(path, DirOp.WRITE);
{code}

[~jingzhao] is this the right direction? Not sure why these methods don't use {{resolvePath}}.

> hdfs snapshotDiff /.reserved/raw/... fails on snapshottable directories
> -----------------------------------------------------------------------
>
>                 Key: HDFS-11481
>                 URL: https://issues.apache.org/jira/browse/HDFS-11481
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.6.0
>            Reporter: Mavin Martin
>            Assignee: Mavin Martin
>            Priority: Minor
>         Attachments: HDFS-11481.001.patch, HDFS-11481.002.patch, HDFS-11481-branch-2.6.0.001.patch
>
>
> Successful command:
> {code}
> #> hdfs snapshotDiff /tmp/dir s1 s2
> Difference between snapshot s1 and snapshot s2 under directory /tmp/dir:
> M       .
> +       ./file1.txt
> {code}
> Unsuccessful command:
> {code}
> #> hdfs snapshotDiff /.reserved/raw/tmp/dir s1 s2
> snapshotDiff: Directory does not exist: /.reserved/raw/tmp/dir
> {code}
> Prefixing with raw path should run successfully and return same output.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message