You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Max Xie (Jira)" <ji...@apache.org> on 2021/03/10 08:52:00 UTC
[jira] [Updated] (HDFS-15886) Add a way to get protected dirs from
a special configuration file
[ https://issues.apache.org/jira/browse/HDFS-15886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Xie updated HDFS-15886:
----------------------------
Description:
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>dfs.protected.directories.config.file.enable</name>
<value>true</value>
</property>
<property>
<name>fs.protected.directories</name>
<value>[file:///path/to/protected.dirs.config]</value>
</property>
```
2. add some protected dirs to the config file ([file:///path/to/protected.dirs.config])
```
/1
/2/3
```
3. done
was:
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>dfs.protected.directories.config.file.enable</name>
<value>true</value>
</property>
<property>
<name>fs.protected.directories</name>
<value>file:///path/to/protected.dirs.config</value>
</property>
```
2. add some protected dirs to the config file (file:///path/to/protected.dirs.config)
```
# protect directories
/1
/2/3
```
3. done
> 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
>
> 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>dfs.protected.directories.config.file.enable</name>
> <value>true</value>
> </property>
> <property>
> <name>fs.protected.directories</name>
> <value>[file:///path/to/protected.dirs.config]</value>
> </property>
> ```
> 2. add some protected dirs to the config file ([file:///path/to/protected.dirs.config])
> ```
> /1
> /2/3
> ```
> 3. done
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org