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

Ayush Saxena commented on HDFS-15243:
-------------------------------------

Thanx [~rain_lyy] for the update, had a quick look.
Some minor stuffs :
* Just one thing {{FS_PROTECTED_SUBDIRECTORIES_ENABLE}} the configuration 
should have {{DFS}} everywhere not {{FS}} since it has been moved to {{HDFS}} 
like {{DFS_PROTECTED_SUBDIRECTORIES_ENABLE}} and 
{{dfs.protected.subdirectories.enable}}
* For the test you added the case for rename can you extend it have it for 
delete too.
* Fix the checkstyle warning.

Apart from these, the patch looks good, +1 once the above are addressed. 

> Child directory should not be deleted or renamed if parent directory is a 
> protected directory
> ---------------------------------------------------------------------------------------------
>
>                 Key: HDFS-15243
>                 URL: https://issues.apache.org/jira/browse/HDFS-15243
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: 3.1.1
>    Affects Versions: 3.1.1
>            Reporter: liuyanyu
>            Assignee: liuyanyu
>            Priority: Major
>         Attachments: HDFS-15243.001.patch, HDFS-15243.002.patch, 
> HDFS-15243.003.patch, HDFS-15243.004.patch, HDFS-15243.005.patch, 
> image-2020-03-28-09-23-31-335.png
>
>
> HDFS-8983 add  fs.protected.directories to support protected directories on 
> NameNode.  But as I test, when set a parent directory(eg /testA)  to 
> protected directory, the child directory (eg /testA/testB) still can be 
> deleted or renamed. When we protect a directory  mainly for protecting the 
> data under this directory , So I think the child directory should not be 
> delete or renamed if the parent directory is a protected directory.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to