瀏覽代碼

HDFS-14630. Configuration.getTimeDurationHelper() should not log time unit warning in info log. Contributed by hemanthboyina.

(cherry picked from commit 5ff76cb8bc69d68ba7c9487d00b1dc753d616bb2)
Surendra Singh Lilhore 5 年之前
父節點
當前提交
abe5358143

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

@@ -1856,8 +1856,6 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
     vStr = StringUtils.toLowerCase(vStr);
     vStr = StringUtils.toLowerCase(vStr);
     ParsedTimeDuration vUnit = ParsedTimeDuration.unitFor(vStr);
     ParsedTimeDuration vUnit = ParsedTimeDuration.unitFor(vStr);
     if (null == vUnit) {
     if (null == vUnit) {
-      logDeprecation("No unit for " + name + "(" + vStr + ") assuming " +
-          defaultUnit);
       vUnit = ParsedTimeDuration.unitFor(defaultUnit);
       vUnit = ParsedTimeDuration.unitFor(defaultUnit);
     } else {
     } else {
       vStr = vStr.substring(0, vStr.lastIndexOf(vUnit.suffix()));
       vStr = vStr.substring(0, vStr.lastIndexOf(vUnit.suffix()));

+ 16 - 7
hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml

@@ -745,7 +745,8 @@
   <value>0</value>
   <value>0</value>
   <description>
   <description>
     Delay for first block report in seconds. Support multiple time unit
     Delay for first block report in seconds. Support multiple time unit
-    suffix(case insensitive), as described in dfs.heartbeat.interval.
+    suffix(case insensitive), as described in dfs.heartbeat.interval.If
+    no time unit is specified then seconds is assumed
   </description>
   </description>
 </property>
 </property>
 
 
@@ -790,7 +791,8 @@
   <description>Interval in seconds for Datanode to scan data directories and
   <description>Interval in seconds for Datanode to scan data directories and
   reconcile the difference between blocks in memory and on the disk.
   reconcile the difference between blocks in memory and on the disk.
   Support multiple time unit suffix(case insensitive), as described
   Support multiple time unit suffix(case insensitive), as described
-  in dfs.heartbeat.interval.
+  in dfs.heartbeat.interval.If no time unit is specified then seconds
+  is assumed.
   </description>
   </description>
 </property>
 </property>
 
 
@@ -831,6 +833,7 @@
     ms(millis), s(sec), m(min), h(hour), d(day)
     ms(millis), s(sec), m(min), h(hour), d(day)
     to specify the time (such as 2s, 2m, 1h, etc.).
     to specify the time (such as 2s, 2m, 1h, etc.).
     Or provide complete number in seconds (such as 30 for 30 seconds).
     Or provide complete number in seconds (such as 30 for 30 seconds).
+    If no time unit is specified then seconds is assumed.
   </description>
   </description>
 </property>
 </property>
 
 
@@ -1039,6 +1042,7 @@
   <description>Namenode periodicity in seconds to check if
   <description>Namenode periodicity in seconds to check if
     decommission or maintenance is complete. Support multiple time unit
     decommission or maintenance is complete. Support multiple time unit
     suffix(case insensitive), as described in dfs.heartbeat.interval.
     suffix(case insensitive), as described in dfs.heartbeat.interval.
+    If no time unit is specified then seconds is assumed.
   </description>
   </description>
 </property>
 </property>
 
 
@@ -1187,7 +1191,8 @@
   <description>
   <description>
     The number of seconds between two periodic checkpoints.
     The number of seconds between two periodic checkpoints.
     Support multiple time unit suffix(case insensitive), as described
     Support multiple time unit suffix(case insensitive), as described
-    in dfs.heartbeat.interval.
+    in dfs.heartbeat.interval.If no time unit is specified then seconds
+    is assumed.
   </description>
   </description>
 </property>
 </property>
 
 
@@ -1206,7 +1211,8 @@
   <description>The SecondaryNameNode and CheckpointNode will poll the NameNode
   <description>The SecondaryNameNode and CheckpointNode will poll the NameNode
   every 'dfs.namenode.checkpoint.check.period' seconds to query the number
   every 'dfs.namenode.checkpoint.check.period' seconds to query the number
   of uncheckpointed transactions. Support multiple time unit suffix(case insensitive),
   of uncheckpointed transactions. Support multiple time unit suffix(case insensitive),
-  as described in dfs.heartbeat.interval.
+  as described in dfs.heartbeat.interval.If no time unit is specified then
+  seconds is assumed.
   </description>
   </description>
 </property>
 </property>
 
 
@@ -1594,7 +1600,8 @@
     The notification is sent by a datanode when it is being shutdown
     The notification is sent by a datanode when it is being shutdown
     using the shutdownDatanode admin command with the upgrade option.
     using the shutdownDatanode admin command with the upgrade option.
     Support multiple time unit suffix(case insensitive), as described
     Support multiple time unit suffix(case insensitive), as described
-    in dfs.heartbeat.interval.
+    in dfs.heartbeat.interval.If no time unit is specified then seconds
+    is assumed.
   </description>
   </description>
 </property>
 </property>
 
 
@@ -1663,7 +1670,8 @@
     often the logs are rolled. Note that failover triggers a log roll
     often the logs are rolled. Note that failover triggers a log roll
     so the StandbyNode will be up to date before it becomes active.
     so the StandbyNode will be up to date before it becomes active.
     Support multiple time unit suffix(case insensitive), as described
     Support multiple time unit suffix(case insensitive), as described
-    in dfs.heartbeat.interval.
+    in dfs.heartbeat.interval.If no time unit is specified then seconds
+    is assumed.
   </description>
   </description>
 </property>
 </property>
 
 
@@ -3445,7 +3453,8 @@
     datanode is not yet registered with the namenode. This wait time
     datanode is not yet registered with the namenode. This wait time
     reduces initial request failures after datanode restart.
     reduces initial request failures after datanode restart.
     Support multiple time unit suffix(case insensitive), as described
     Support multiple time unit suffix(case insensitive), as described
-    in dfs.heartbeat.interval.
+    in dfs.heartbeat.interval.If no time unit is specified then seconds
+    is assumed.
   </description>
   </description>
 </property>
 </property>