Skip to content

Commit 0b9a9f9

Browse files
committed
HDFS-6106. Reduce default for dfs.namenode.path.based.cache.refresh.interval.ms (cmccabe)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1577798 13f79535-47bb-0310-9956-ffa450edef68
1 parent 14b2d8f commit 0b9a9f9

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ Release 2.4.0 - UNRELEASED
406406
HDFS-6084. Namenode UI - "Hadoop" logo link shouldn't go to hadoop
407407
homepage. (Travis Thompson via wheat9)
408408

409+
HDFS-6106. Reduce default for
410+
dfs.namenode.path.based.cache.refresh.interval.ms (cmccabe)
411+
409412
OPTIMIZATIONS
410413

411414
HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public class DFSConfigKeys extends CommonConfigurationKeys {
242242
public static final int DFS_NAMENODE_LIST_CACHE_DIRECTIVES_NUM_RESPONSES_DEFAULT = 100;
243243
public static final String DFS_NAMENODE_PATH_BASED_CACHE_REFRESH_INTERVAL_MS =
244244
"dfs.namenode.path.based.cache.refresh.interval.ms";
245-
public static final long DFS_NAMENODE_PATH_BASED_CACHE_REFRESH_INTERVAL_MS_DEFAULT = 300000L;
245+
public static final long DFS_NAMENODE_PATH_BASED_CACHE_REFRESH_INTERVAL_MS_DEFAULT = 30000L;
246246

247247
// Whether to enable datanode's stale state detection and usage for reads
248248
public static final String DFS_NAMENODE_AVOID_STALE_DATANODE_FOR_READ_KEY = "dfs.namenode.avoid.read.stale.datanode";
@@ -370,7 +370,7 @@ public class DFSConfigKeys extends CommonConfigurationKeys {
370370
public static final String DFS_HEARTBEAT_INTERVAL_KEY = "dfs.heartbeat.interval";
371371
public static final long DFS_HEARTBEAT_INTERVAL_DEFAULT = 3;
372372
public static final String DFS_NAMENODE_PATH_BASED_CACHE_RETRY_INTERVAL_MS = "dfs.namenode.path.based.cache.retry.interval.ms";
373-
public static final long DFS_NAMENODE_PATH_BASED_CACHE_RETRY_INTERVAL_MS_DEFAULT = 60000L;
373+
public static final long DFS_NAMENODE_PATH_BASED_CACHE_RETRY_INTERVAL_MS_DEFAULT = 30000L;
374374
public static final String DFS_NAMENODE_DECOMMISSION_INTERVAL_KEY = "dfs.namenode.decommission.interval";
375375
public static final int DFS_NAMENODE_DECOMMISSION_INTERVAL_DEFAULT = 30;
376376
public static final String DFS_NAMENODE_DECOMMISSION_NODES_PER_INTERVAL_KEY = "dfs.namenode.decommission.nodes.per.interval";

hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,19 +1662,19 @@
16621662

16631663
<property>
16641664
<name>dfs.namenode.path.based.cache.refresh.interval.ms</name>
1665-
<value>300000</value>
1665+
<value>30000</value>
16661666
<description>
16671667
The amount of milliseconds between subsequent path cache rescans. Path
16681668
cache rescans are when we calculate which blocks should be cached, and on
16691669
what datanodes.
16701670

1671-
By default, this parameter is set to 300000, which is five minutes.
1671+
By default, this parameter is set to 30 seconds.
16721672
</description>
16731673
</property>
16741674

16751675
<property>
16761676
<name>dfs.namenode.path.based.cache.retry.interval.ms</name>
1677-
<value>60000</value>
1677+
<value>30000</value>
16781678
<description>
16791679
When the NameNode needs to uncache something that is cached, or cache
16801680
something that is not cached, it must direct the DataNodes to do so by

0 commit comments

Comments
 (0)