hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-961) dfs_readdir incorrectly parses paths
Date Thu, 11 Mar 2010 00:23:27 GMT

    [ https://issues.apache.org/jira/browse/HDFS-961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843846#action_12843846
] 

Hudson commented on HDFS-961:
-----------------------------

Integrated in Hadoop-Hdfs-trunk-Commit #212 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/212/])
    . dfs_readdir incorrectly parses paths. Contributed by Eli Collins.


> dfs_readdir incorrectly parses paths
> ------------------------------------
>
>                 Key: HDFS-961
>                 URL: https://issues.apache.org/jira/browse/HDFS-961
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: contrib/fuse-dfs
>    Affects Versions: 0.20.1, 0.20.2, 0.21.0
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>             Fix For: 0.22.0
>
>         Attachments: hdfs-961-1.patch, hdfs-961-2.patch
>
>
> fuse-dfs dfs_readdir assumes that DistributedFileSystem#listStatus returns Paths with
the same scheme/authority as the dfs.name.dir used to connect. If NameNode.DEFAULT_PORT port
is used listStatus returns Paths that have authorities without the port (see HDFS-960), which
breaks the following code. 
> {code}
> // hack city: todo fix the below to something nicer and more maintainable but
> // with good performance
> // strip off the path but be careful if the path is solely '/'
> // NOTE - this API started returning filenames as full dfs uris
> const char *const str = info[i].mName + dfs->dfs_uri_len + path_len + ((path_len ==
1 && *path == '/') ? 0 : 1);
> {code}
> Let's make the path parsing here more robust. listStatus returns normalized paths so
we can find the start of the path by searching for the 3rd slash. A more long term solution
is to have hdfsFileInfo maintain a path object or at least pointers to the relevant URI components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message