You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Siyao Meng (JIRA)" <ji...@apache.org> on 2018/08/30 18:43:00 UTC

[jira] [Reopened] (HDFS-13838) WebHdfsFileSystem.getFileStatus() won't return correct "snapshot enabled" status

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

Siyao Meng reopened HDFS-13838:
-------------------------------

> WebHdfsFileSystem.getFileStatus() won't return correct "snapshot enabled" status
> --------------------------------------------------------------------------------
>
>                 Key: HDFS-13838
>                 URL: https://issues.apache.org/jira/browse/HDFS-13838
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs, webhdfs
>    Affects Versions: 3.1.0, 3.0.3
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>             Fix For: 3.2.0, 3.0.4, 3.1.2
>
>         Attachments: HDFS-13838.001.patch
>
>
> "Snapshot enabled" status has been added in HDFS-12455 by [~ajaykumar].
> However, it is found by [~jojochuang] that WebHdfsFileSystem.getFileStatus() won't return the correct "snapshot enabled" status. The reason is that JsonUtilClient.toFileStatus() did not check and append the "snapshot enabled" flag to the resulting HdfsFileStatus object.
> Proof:
> In TestWebHDFS#testWebHdfsAllowandDisallowSnapshots(), add the following lines indicated by prepending "+":
>  
> {code:java}
> // allow snapshots on /bar using webhdfs
> webHdfs.allowSnapshot(bar);
> +// check if snapshot status is enabled
> +assertTrue(dfs.getFileStatus(bar).isSnapshotEnabled());
> +assertTrue(webHdfs.getFileStatus(bar).isSnapshotEnabled());{code}
>  
> The first assertion will pass, as expected, while the second assertion will fail because of the reason above.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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