You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "John Zhuge (JIRA)" <ji...@apache.org> on 2017/04/18 04:25:42 UTC

[jira] [Updated] (HADOOP-13734) Swift lists empty file as directory

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

John Zhuge updated HADOOP-13734:
--------------------------------
    Summary: Swift lists empty file as directory  (was: ListStatus Returns Incorrect Result for Empty File on Swift)

> Swift lists empty file as directory
> -----------------------------------
>
>                 Key: HADOOP-13734
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13734
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/swift
>            Reporter: Kevin Huang
>
> Reproduce steps:
> 1. Create a empty file on Swift via Swift client(e.g Cyberduck)
> 2. Use Hadoop Swift API to get file status. The following is the code example:
> {code}
>         Configuration hadoopConf = new Configuration();
>         hadoopConf.addResource("swift-site.xml"); // Set Swift configurations
>         FileSystem fs = FileSystem.get(new URI("swift://bdd-edp.bddcs/"), hadoopConf);
>         FileStatus[] statuses = fs.listStatus(new Path("/mydir"));
>         for(FileStatus status : statuses) {
>             System.out.println(status);
>         }
> {code}
> Result:
> {code}
> SwiftFileStatus{ path=swift://bdd-edp.bddcs/mydir/emptyfile; isDirectory=true; length=0; blocksize=33554432; modification_time=1476875293230}
> {code}
> API treated empty file as a directory. That is incorrect.



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

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