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 Fri, 15 Jan 2010 21:02:54 GMT

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

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

Hey Sanjay,

{quote}
createSymlink
should follow the create() and mkdir() methods of providing a parameter to indicate if missing
parent dirs should be created.
{quote}

Agreed, will do. I'm not going to add a convenience method that doesn't take the createParent
argument.

bq. return parameter - somewhat religious - my preference is for the return to be void. Matches
mkdir.

Changed that in the previous patch, it returns void. 

Will update the java docs per the above.  The latest description of the _new_ APIs follows,
will update the design doc.

Thanks,
Eli

h4. FileContext

* {{FileContext#getLinkFileStatus}} -- If the final path component refers to a symlink then
the FileStatus of the symlink is returned. If the the final path component does not refer
to a symlink, or the underlying filesystem does not support symlinks, then the result is the
same as if {{getFileStatus}} was called (like {{lstat}}).

* {{FileContext#getLinkTarget}} -- If the final path component refers to a symlink then the
target of the symlink is returned. Links within the path leading up to the final path component
are resolved transparently. The target returned is exactly as it was specified in createSymlink.
If the the final path component does not refer to a symlink then an IOException is thrown
(like {{readlink}} which returns EINVAL if the named file is not a symbolic link).

* {{FileContext#createSymlink}} -- Creates a symbolic link to an existing file. An exception
is thrown if the link exits, the user does not have permission to create link, or the underlying
file system does not support symlinks.

h4. FileStatus

* {{FileStatus#isSymlink}} -- Returns true if the FileStatus represents a symbolic link.

* {{FileStatus#getSymlink}} -- If the FileStatus represents a sylink then the target of the
symlink is returned. The symlink target returned is exactly as it was specified in createSymlink.
Otherwise an IOException is thrown indicating the FileStatus does not refer to a symlink.

h4. AbstractFileSystem

* {{AbstractFileSystem#supportsSymlinks}} -- Returns true if the file system supports symlinks,
false otherwise.

* {{AbstractFileSystem#createSymlink}} -- Like FileContext#createSymlink. An IOException is
thrown if the file system does not support symlinks.

* {{AbstractFileSystem#getLinkTarget}} -- Like FileContext#createSymlink. This method is only
called by FileContext in response to an UnresolvedLinkException.

* {{AbstractFileSystem#getFileLinkStatus}} -- Like FileContext#getFileLinkStatus. Except that
an UnresolvedLinkException may be thrown if a symlink is  encountered in the path leading
up to the final path component.



> 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, symlink27-common.patch, symlink28-common.patch, symlink29-common.patch,
symlink29-common.patch, symlink29-common.patch, symlink30-common.patch, symlink31-common.patch,
symlink32-common.patch, symlink33-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