[ https://issues.apache.org/jira/browse/HDFS-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271684#comment-13271684 ]
Liyin Tang commented on HDFS-3370: ---------------------------------- @M.C.Srivas, I am afraid that I didn't quite understand your concerns. bq. 1. Changing the permissions along the path "/path1/dirA" to make "file" inaccessible works, but now with hard-links "/path2/dirB" is wide open. 2. Rename "/path2/dirB" to "/path3/dirC" will require taking locks on "/path1/dirA" ... but the "file" does not have "parent ptrs" to figure out which path(s) to lock. 1) Hardlinked files are suposed to have the same permission as the source file. 2) Each INodeFile do have a parent pointer to its parent in HDFS and also which lock are you talking about exactly (in the implementation's perspective) ? @Daryn Sharp: bq. I did a little testing and didn't realize that a hard link retains the same attrs (owner, group, perms, xattrs, etc) as the original file. Changing one implicit changes the others, so that negates some issues such as differing replication factor concerns. Perhaps hard link creation can be restricted to only the file owner and superuser. Totally agreed:) bq. The quota concerns are still a bit more complex. Unixy systems like linux and bsd only have fs level quotas for users, so quota handling is trivial compared to directory level quotas in hdfs. Since all hard links implicitly have the same owner, quotas are as simple as incrementing the user's ds quota is at file creation, and decrement when all links are removed. This why a DOS is possible against a user. >From the security perspective, users should be responsible to set the correct >permission to protect themselves. In this cases, users should ONLY grant the >EXECUTE permission to the trusted users for hardlinkling. bq. I'm sorry if I'm missing a detail, but I remain unclear on how you are proposing to handle the directory level quotas. I don't fully grok how finding a common ancestor with a quota is sufficient because quotas can be added or removed at any time. Maybe part of the issue too is I have nested directories with individual quotas in mind, whereas maybe you are assuming one and only one quota from the root? Would you mind giving me an exact example for your concerns about quotas? I would be very happy to explain it in details :) > 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