Skip to content

Commit 58fe5b2

Browse files
surendralilhoreiwasakims
authored andcommitted
HDFS-14630. Configuration.getTimeDurationHelper() should not log time unit warning in info log. Contributed by hemanthboyina.
(cherry picked from commit 5ff76cb)
1 parent 826d13a commit 58fe5b2

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java

100644100755
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,8 +1856,6 @@ private long getTimeDurationHelper(String name, String vStr,
18561856
vStr = StringUtils.toLowerCase(vStr);
18571857
ParsedTimeDuration vUnit = ParsedTimeDuration.unitFor(vStr);
18581858
if (null == vUnit) {
1859-
logDeprecation("No unit for " + name + "(" + vStr + ") assuming " +
1860-
defaultUnit);
18611859
vUnit = ParsedTimeDuration.unitFor(defaultUnit);
18621860
} else {
18631861
vStr = vStr.substring(0, vStr.lastIndexOf(vUnit.suffix()));

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

100644100755
Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,8 @@
745745
<value>0</value>
746746
<description>
747747
Delay for first block report in seconds. Support multiple time unit
748-
suffix(case insensitive), as described in dfs.heartbeat.interval.
748+
suffix(case insensitive), as described in dfs.heartbeat.interval.If
749+
no time unit is specified then seconds is assumed
749750
</description>
750751
</property>
751752

@@ -790,7 +791,8 @@
790791
<description>Interval in seconds for Datanode to scan data directories and
791792
reconcile the difference between blocks in memory and on the disk.
792793
Support multiple time unit suffix(case insensitive), as described
793-
in dfs.heartbeat.interval.
794+
in dfs.heartbeat.interval.If no time unit is specified then seconds
795+
is assumed.
794796
</description>
795797
</property>
796798

@@ -831,6 +833,7 @@
831833
ms(millis), s(sec), m(min), h(hour), d(day)
832834
to specify the time (such as 2s, 2m, 1h, etc.).
833835
Or provide complete number in seconds (such as 30 for 30 seconds).
836+
If no time unit is specified then seconds is assumed.
834837
</description>
835838
</property>
836839

@@ -1039,6 +1042,7 @@
10391042
<description>Namenode periodicity in seconds to check if
10401043
decommission or maintenance is complete. Support multiple time unit
10411044
suffix(case insensitive), as described in dfs.heartbeat.interval.
1045+
If no time unit is specified then seconds is assumed.
10421046
</description>
10431047
</property>
10441048

@@ -1187,7 +1191,8 @@
11871191
<description>
11881192
The number of seconds between two periodic checkpoints.
11891193
Support multiple time unit suffix(case insensitive), as described
1190-
in dfs.heartbeat.interval.
1194+
in dfs.heartbeat.interval.If no time unit is specified then seconds
1195+
is assumed.
11911196
</description>
11921197
</property>
11931198

@@ -1206,7 +1211,8 @@
12061211
<description>The SecondaryNameNode and CheckpointNode will poll the NameNode
12071212
every 'dfs.namenode.checkpoint.check.period' seconds to query the number
12081213
of uncheckpointed transactions. Support multiple time unit suffix(case insensitive),
1209-
as described in dfs.heartbeat.interval.
1214+
as described in dfs.heartbeat.interval.If no time unit is specified then
1215+
seconds is assumed.
12101216
</description>
12111217
</property>
12121218

@@ -1594,7 +1600,8 @@
15941600
The notification is sent by a datanode when it is being shutdown
15951601
using the shutdownDatanode admin command with the upgrade option.
15961602
Support multiple time unit suffix(case insensitive), as described
1597-
in dfs.heartbeat.interval.
1603+
in dfs.heartbeat.interval.If no time unit is specified then seconds
1604+
is assumed.
15981605
</description>
15991606
</property>
16001607

@@ -1663,7 +1670,8 @@
16631670
often the logs are rolled. Note that failover triggers a log roll
16641671
so the StandbyNode will be up to date before it becomes active.
16651672
Support multiple time unit suffix(case insensitive), as described
1666-
in dfs.heartbeat.interval.
1673+
in dfs.heartbeat.interval.If no time unit is specified then seconds
1674+
is assumed.
16671675
</description>
16681676
</property>
16691677

@@ -3445,7 +3453,8 @@
34453453
datanode is not yet registered with the namenode. This wait time
34463454
reduces initial request failures after datanode restart.
34473455
Support multiple time unit suffix(case insensitive), as described
3448-
in dfs.heartbeat.interval.
3456+
in dfs.heartbeat.interval.If no time unit is specified then seconds
3457+
is assumed.
34493458
</description>
34503459
</property>
34513460

0 commit comments

Comments
 (0)