This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 5746533  HADOOP-16962. Making `getBoolean` log warning message for 
unrecognized value. Contributed by Ctest.
5746533 is described below

commit 5746533cde0065761a68a9b3e89ee01da6c8eeeb
Author: Ayush Saxena <[email protected]>
AuthorDate: Thu Apr 9 23:29:48 2020 +0530

    HADOOP-16962. Making `getBoolean` log warning message for unrecognized 
value. Contributed by Ctest.
---
 .../src/main/java/org/apache/hadoop/conf/Configuration.java         | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
index 9a8841e7..9751a9b 100755
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
@@ -1690,7 +1690,11 @@ public class Configuration implements 
Iterable<Map.Entry<String,String>>,
       return true;
     else if (StringUtils.equalsIgnoreCase("false", valueString))
       return false;
-    else return defaultValue;
+    else {
+      LOG.warn("Invalid value for boolean: " + valueString +
+               ", choose default value: " + defaultValue + " for " + name);
+      return defaultValue;
+    }
   }
 
   /** 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to