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

Yi Liu commented on HDFS-6886:
------------------------------

Hi, Thanks [~vinayrpet] for the review (latest patch has few change as 
following).  To create/remove a file, we should check its (ancestor)parent 'w' 
permission,  creating file + overwrite implies the old file will be removed if 
it exists and then create a new one. Also creating with overwrite requires the 
path 'w' permission. So we need to do both the two checks. 
Then for permission check, it's the same logic as original code and HDFS 
permissions guide (like POSIX mode).
{code}
if (isPermissionEnabled) {
  // To remove a file, we need to check 'w' permission of parent
  checkParentAccess(pc, src, FsAction.WRITE);
}
{code}

> Use single editlog record for creating file + overwrite.
> --------------------------------------------------------
>
>                 Key: HDFS-6886
>                 URL: https://issues.apache.org/jira/browse/HDFS-6886
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>            Priority: Critical
>         Attachments: HDFS-6886.001.patch, HDFS-6886.002.patch, editsStored
>
>
> As discussed in HDFS-6871, as [~jingzhao] and [~cmccabe]'s suggestion, we 
> could do further improvement to use one editlog record for creating file + 
> overwrite in this JIRA. We could record the overwrite flag in editlog for 
> creating file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to