[
https://issues.apache.org/jira/browse/HDFS-15886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18042656#comment-18042656
]
ASF GitHub Bot commented on HDFS-15886:
---------------------------------------
github-actions[bot] commented on PR #2768:
URL: https://github.com/apache/hadoop/pull/2768#issuecomment-3609383215
We're closing this stale PR because it has been open for 100 days with no
activity. This isn't a judgement on the merit of the PR in any way. It's just a
way of keeping the PR queue manageable.
If you feel like this was a mistake, or you would like to continue working
on it, please feel free to re-open it and ask for a committer to remove the
stale tag and review again.
Thanks all for your contribution.
> Add a way to get protected dirs from a special configuration file
> -----------------------------------------------------------------
>
> Key: HDFS-15886
> URL: https://issues.apache.org/jira/browse/HDFS-15886
> Project: Hadoop HDFS
> Issue Type: New Feature
> Components: namenode
> Affects Versions: 3.4.0
> Reporter: Max Xie
> Assignee: Max Xie
> Priority: Minor
> Labels: pull-request-available
> Attachments: HDFS-15886.patch
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> We used protected dirs to ensure that important data directories cannot be
> deleted by mistake. But protected dirs can only be configured in
> hdfs-site.xml.
> For ease of management, we add a way to get the list of protected dirs from
> a special configuration file.
> How to use.
> 1. set the config in hdfs-site.xml
> ```
> <property>
> <name>fs.protected.directories</name>
>
> <value>/hdfs/path/1,/hdfs/path/2,[file:///path/to/protected.dirs.config]</value>
> </property>
> ```
> 2. add some protected dirs to the config file
> ([file:///path/to/protected.dirs.config])
> ```
> /hdfs/path/4
> /hdfs/path/5
> ```
> 3. use command to refresh fs.protected.directories instead of
> FSDirectory.setProtectedDirectories(..)
> ```
> hdfs dfsadmin -refreshProtectedDirectories
> ```
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]