HDFS-16209. Add description for dfs.namenode.caching.enabled (#3378)

This commit is contained in:
litao 2021-09-08 12:38:55 +08:00 committed by GitHub
parent 9512c774c0
commit 5a306955a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -462,6 +462,7 @@ public class DFSConfigKeys extends CommonConfigurationKeys {
public static final long DFS_NAMENODE_PATH_BASED_CACHE_REFRESH_INTERVAL_MS_DEFAULT = 30000L;
public static final String DFS_NAMENODE_CACHING_ENABLED_KEY =
"dfs.namenode.caching.enabled";
// TODO: Default value to be set false in 4.0.0 release onwards (HDFS-16209)
public static final boolean DFS_NAMENODE_CACHING_ENABLED_DEFAULT = true;
/** Pending period of block deletion since NameNode startup */

View File

@ -2868,6 +2868,10 @@
maintain a mapping of cached blocks to DataNodes via processing DataNode
cache reports. Based on these reports and addition and removal of caching
directives, the NameNode will schedule caching and uncaching work.
In the current implementation, centralized caching introduces additional
write lock overhead (see CacheReplicationMonitor#rescan) even if no path
to cache is specified, so we recommend disabling this feature when not in
use. We will disable centralized caching by default in later versions.
</description>
</property>

View File

@ -256,7 +256,7 @@ The following properties are not required, but may be specified for tuning:
* dfs.namenode.caching.enabled
This parameter can be used to enable/disable the centralized caching in NameNode. When centralized caching is disabled, NameNode will not process cache reports or store information about block cache locations on the cluster. Note that NameNode will continute to store the path based cache locations in the file-system metadata, even though it will not act on this information until the caching is enabled. The default value for this parameter is true (i.e. centralized caching is enabled).
This parameter can be used to enable/disable the centralized caching in NameNode. When centralized caching is disabled, NameNode will not process cache reports or store information about block cache locations on the cluster. Note that NameNode will continute to store the path based cache locations in the file-system metadata, even though it will not act on this information until the caching is enabled. The default value for this parameter is true (i.e. centralized caching is enabled). In the current implementation, centralized caching introduces additional write lock overhead (see CacheReplicationMonitor#rescan) even if no path to cache is specified, so we recommend disabling this feature when not in use. We will disable centralized caching by default in later versions.
* dfs.datanode.pmem.cache.recovery