You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org> on 2011/03/10 01:13:00 UTC
[jira] Created: (HDFS-1743) HdfsFileStatus.getLocalName() returns
an empty string when listing a full file path.
HdfsFileStatus.getLocalName() returns an empty string when listing a full file path.
------------------------------------------------------------------------------------
Key: HDFS-1743
URL: https://issues.apache.org/jira/browse/HDFS-1743
Project: Hadoop HDFS
Issue Type: Bug
Components: hdfs client, name-node
Reporter: Tsz Wo (Nicholas), SZE
If a {{HdfsFileStatus}} is obtained through {{DFSClient.listPaths(..)}}, then {{HdfsFileStatus.getLocalName()}} returns the file name.
However, if a {{HdfsFileStatus}} is obtained using {{DFSClient.getFileInfo(..)}}, then {{HdfsFileStatus.getLocalName()}} returns an empty string.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HDFS-1743) HdfsFileStatus.getLocalName() returns
an empty string when listing a full file path.
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz Wo (Nicholas), SZE updated HDFS-1743:
-----------------------------------------
Attachment: TestHdfsFileStatus.java
TestHdfsFileStatus.java shows the bug.
In particular, the following test log shows the inconsistency.
{noformat}
2011-03-10 00:05:19,963 INFO fs.FileSystem (TestHdfsFileStatus.java:testHdfsFileStatus(71)) - partial[0].getLocalName() = foo.txt
2011-03-10 00:05:19,965 INFO fs.FileSystem (TestHdfsFileStatus.java:testHdfsFileStatus(76)) - hdfsfilestatus.getLocalName() =
{noformat}
> HdfsFileStatus.getLocalName() returns an empty string when listing a full file path.
> ------------------------------------------------------------------------------------
>
> Key: HDFS-1743
> URL: https://issues.apache.org/jira/browse/HDFS-1743
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs client, name-node
> Reporter: Tsz Wo (Nicholas), SZE
> Attachments: TestHdfsFileStatus.java
>
>
> If a {{HdfsFileStatus}} is obtained through {{DFSClient.listPaths(..)}}, then {{HdfsFileStatus.getLocalName()}} returns the file name.
> However, if a {{HdfsFileStatus}} is obtained using {{DFSClient.getFileInfo(..)}}, then {{HdfsFileStatus.getLocalName()}} returns an empty string.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HDFS-1743) HdfsFileStatus.getLocalName() returns
an empty string when listing a full file path.
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-1743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz Wo (Nicholas), SZE updated HDFS-1743:
-----------------------------------------
Description:
If a {{HdfsFileStatus}} of a file is obtained through {{FSDirectory.getListing(..)}} on a directory, then {{HdfsFileStatus.getLocalName()}} returns the file name.
However, if a {{HdfsFileStatus}} is obtained using {{FSDirectory.getFileInfo(..)}} or {{FSDirectory.getListing(..)}} by giving a full path of a file, then {{HdfsFileStatus.getLocalName()}} returns an empty string.
was:
If a {{HdfsFileStatus}} is obtained through {{DFSClient.listPaths(..)}}, then {{HdfsFileStatus.getLocalName()}} returns the file name.
However, if a {{HdfsFileStatus}} is obtained using {{DFSClient.getFileInfo(..)}}, then {{HdfsFileStatus.getLocalName()}} returns an empty string.
(Revised the description.)
I think we should just remove {{HdfsFileStatus.getLocalName()}} since there is no easy way to use it correctly. See also HDFS-1750.
> HdfsFileStatus.getLocalName() returns an empty string when listing a full file path.
> ------------------------------------------------------------------------------------
>
> Key: HDFS-1743
> URL: https://issues.apache.org/jira/browse/HDFS-1743
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs client, name-node
> Reporter: Tsz Wo (Nicholas), SZE
> Attachments: TestHdfsFileStatus.java
>
>
> If a {{HdfsFileStatus}} of a file is obtained through {{FSDirectory.getListing(..)}} on a directory, then {{HdfsFileStatus.getLocalName()}} returns the file name.
> However, if a {{HdfsFileStatus}} is obtained using {{FSDirectory.getFileInfo(..)}} or {{FSDirectory.getListing(..)}} by giving a full path of a file, then {{HdfsFileStatus.getLocalName()}} returns an empty string.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira