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

Lars Hofhansl commented on HDFS-3370:
-------------------------------------

Reading through the Design Doc it seems that 
FileSystem.{setPermission|setOwner} would be awkward. We'd have to find each 
INodeHardLinkFile pointing to the same "file" and then changing all their 
permissions/owners.

HardLinkFileInfo could also maintain permissions and owners (since they - 
following posix - are the same for each hard link). That way changing owner or 
permissions would immediately affect all hard links.
When the fsimage is saved each INodeHardLinkFile would still write its own 
permission and owner (for simplicity, but that could be optimized, as long as 
at least one INode writes the permissions/owner).
Upon read INode representing a hardlink must have the same permission/owner as 
all other INodes linking to the same "file". If not the image is inconsistent.

In that case HardLinkFileInfo would not need to maintain a list of pointers 
back to all INodeHardLinkFiles, and owner/permissions would only be stored once 
in memory.

                
> HDFS hardlink
> -------------
>
>                 Key: HDFS-3370
>                 URL: https://issues.apache.org/jira/browse/HDFS-3370
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>            Reporter: Hairong Kuang
>            Assignee: Liyin Tang
>         Attachments: HDFS-HardLink.pdf
>
>
> We'd like to add a new feature hardlink to HDFS that allows harlinked files 
> to share data without copying. Currently we will support hardlinking only 
> closed files, but it could be extended to unclosed files as well.
> Among many potential use cases of the feature, the following two are 
> primarily used in facebook:
> 1. This provides a lightweight way for applications like hbase to create a 
> snapshot;
> 2. This also allows an application like Hive to move a table to a different 
> directory without breaking current running hive queries.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to