hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HDFS-1743) HdfsFileStatus.getLocalName() returns an empty string when listing a full file path.
Date Thu, 17 Mar 2011 21:40:29 GMT

     [ 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

Mime
View raw message