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

Colin Patrick McCabe updated HADOOP-9780:
-----------------------------------------

    Description: 
Currently, when you follow a symlink, you get back the resolved path, with all 
symlinks removed.  For compatibility reasons, we might want to have the 
returned path be an unresolved path.

Example: if you have:
{code}
/a -> b
/b
/b/c
{code}

{{getFileStatus("/a/c")}} will return a {{FileStatus}} object with a {{Path}} 
of {{"/b/c"}}.

If we returned the unresolved path, that would be {{"/a/c"}}

  was:We should consider providing the original symlink path in 
getFileLinkStatus rather than the resolved path.  Users who want the resolved 
path can use {{FileSystem#resolvePath}} to get that; users who just want 
information about the symlink itself (probably most users) don't have to pay 
the cost of resolution.


> Filesystem and FileContext methods that follow symlinks should return 
> unresolved paths
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9780
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9780
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Colin Patrick McCabe
>            Priority: Minor
>
> Currently, when you follow a symlink, you get back the resolved path, with 
> all symlinks removed.  For compatibility reasons, we might want to have the 
> returned path be an unresolved path.
> Example: if you have:
> {code}
> /a -> b
> /b
> /b/c
> {code}
> {{getFileStatus("/a/c")}} will return a {{FileStatus}} object with a {{Path}} 
> of {{"/b/c"}}.
> If we returned the unresolved path, that would be {{"/a/c"}}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to