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 "Yiqun Lin (JIRA)" <ji...@apache.org> on 2016/05/11 02:49:12 UTC
[jira] [Created] (HDFS-10388) DistributedFileSystem#getStatus
returns a misleading FsStatus
Yiqun Lin created HDFS-10388:
--------------------------------
Summary: 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
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 indicated that the invoked method isn't available in {{DistributedFileSystem}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org