hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Collins (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6421) Symbolic links
Date Tue, 15 Dec 2009 23:51:18 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-6421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791047#action_12791047
] 

Eli Collins commented on HADOOP-6421:
-------------------------------------

The isQualified test is an error check. Ideally the namenode resolves all links within the
file system so all the UnresolvedLinkExceptions that FileContext sees have fully qualified
targets. In the current patch the namenode throws an exception to the client even if the link
is within the same file system, but even then we want to check that we got back a fully qualified
path be clear that the interpretation of the link target is done by the AbstractFileSystem
and not FileContext. So I think we need a function to determine if a path is fully qualified
in any case right? It also serves to define what we mean by "fully qualified" in Path (this
is currently defined implicitly in the makeQualfied method).

I took your (excellent) suggestion of storing the link target verbatim but have the client
return a fully qualified path. That's definitely the way to go. The current semantics follow,
will update the design doc. All of these cases are now covered in individual tests in TestLink
and TestLocalFsLink.

* Relative link targets

{{fc.createSymlink("file", "/dir/link")}} creates a link named "link" in /dir (assuming the
current working directory is "/dir") that points to "file", eg resolves to "/dir/file", and
if "dir" is renamed "dir2" the link resolves to "/dir2/link" because the path is not stored
relative. The file context is determined by the parent of the link, eg the fully qualified
path of the link target of "/dir/link" is determined by "/dir" not the file context that is
used to access the link.

* Absolute links targets 

{{fc.createSymlink("/dir/file", "/dir/link")}} creates a link named "link" in /dir that points
to "/dir/file", if "dir" is renamed "dir2" the link becomes dangling because the link target
is stored absolute. The file system is determined by the source not the client, eg {{fc.open("hdfs://host1/dir/link")}}
opens "/dir/file" on host1 even if accessed using a local file context.

* Fully qualified link targets

{{fc.createSymlink("hdfs://host/dir/file", "/dir/link")}} creates a link named "link" in /dir
that always points to the fully qualified path specified, regardless of the file context or
path used to access the link.

> Symbolic links
> --------------
>
>                 Key: HADOOP-6421
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6421
>             Project: Hadoop Common
>          Issue Type: New Feature
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: symlink-25-common.patch, symlink-26-common.patch, symlink-26-common.patch,
symlink24-common.patch
>
>
> Here's a jira for the common parts of HDFS-245, mostly changes to FileContext and AbstractFileSystem.

-- 
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