hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-10388) DistributedFileSystem#getStatus returns a misleading FsStatus
Date Mon, 12 Mar 2018 19:03:00 GMT

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

Chris Douglas updated HDFS-10388:
    Resolution: Invalid
        Status: Resolved  (was: Patch Available)

This appears to be working as designed, since HDFS doesn't support partitions. I'd expect
this is also correct in RBF scenarios. [~elgoiri], do you want to check? [~linyiqun], please
reopen if this remains an issue

> DistributedFileSystem#getStatus returns a misleading FsStatus
> -------------------------------------------------------------
>                 Key: HDFS-10388
>                 URL: https://issues.apache.org/jira/browse/HDFS-10388
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.7.1
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>            Priority: Major
>         Attachments: HDFS-10388.001.patch
> The method {{DistributedFileSystem#getStatus}} returns the dfs's disk status.
> {code}
>    public FsStatus getStatus(Path p) throws IOException {
>      statistics.incrementReadOps(1);
>     return dfs.getDiskStatus();
>    }
> {code}
> So the param path is no meaning here. And the object returned will mislead for users
to use this method. I looked into the code, only when the file system has multiple partitions,
the use and capacity of the partition pointed to by the specified path will be reflected.
For example, in the subclass {{RawLocalFileSystem}}, it will be return correctly.
> We should return a new meaningless FsStatus here (like new FsStatus(0, 0, 0)) and indicate
that the invoked method isn't available in {{DistributedFileSystem}}.

This message was sent by Atlassian JIRA

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

View raw message