Browse Source

HADOOP-11085. Excessive logging by org.apache.hadoop.util.Progress when value is NaN. Contributed by Mit Desai
(cherry picked from commit 581176cdc868b8701a761b5a0d52f771cbba709a)

Jason Lowe 11 years ago
parent
commit
b4ab7aa110

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -454,6 +454,9 @@ Release 2.6.0 - UNRELEASED
     HADOOP-9989. Bug introduced in HADOOP-9374, which parses the -tokenCacheFile 
     HADOOP-9989. Bug introduced in HADOOP-9374, which parses the -tokenCacheFile 
     as binary file but set it to the configuration as JSON file. (zxu via tucu)
     as binary file but set it to the configuration as JSON file. (zxu via tucu)
 
 
+    HADOOP-11085. Excessive logging by org.apache.hadoop.util.Progress when
+    value is NaN (Mit Desai via jlowe)
+
 Release 2.5.1 - UNRELEASED
 Release 2.5.1 - UNRELEASED
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 5 - 5
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Progress.java

@@ -162,27 +162,27 @@ public class Progress {
   public synchronized void set(float progress) {
   public synchronized void set(float progress) {
     if (Float.isNaN(progress)) {
     if (Float.isNaN(progress)) {
       progress = 0;
       progress = 0;
-      LOG.warn("Illegal progress value found, progress is Float.NaN. " +
+      LOG.debug("Illegal progress value found, progress is Float.NaN. " +
         "Progress will be changed to 0");
         "Progress will be changed to 0");
     }
     }
     else if (progress == Float.NEGATIVE_INFINITY) {
     else if (progress == Float.NEGATIVE_INFINITY) {
       progress = 0;
       progress = 0;
-      LOG.warn("Illegal progress value found, progress is " +
+      LOG.debug("Illegal progress value found, progress is " +
         "Float.NEGATIVE_INFINITY. Progress will be changed to 0");
         "Float.NEGATIVE_INFINITY. Progress will be changed to 0");
     }
     }
     else if (progress < 0) {
     else if (progress < 0) {
       progress = 0;
       progress = 0;
-      LOG.warn("Illegal progress value found, progress is less than 0." +
+      LOG.debug("Illegal progress value found, progress is less than 0." +
         " Progress will be changed to 0");
         " Progress will be changed to 0");
     }
     }
     else if (progress > 1) {
     else if (progress > 1) {
       progress = 1;
       progress = 1;
-      LOG.warn("Illegal progress value found, progress is larger than 1." +
+      LOG.debug("Illegal progress value found, progress is larger than 1." +
         " Progress will be changed to 1");
         " Progress will be changed to 1");
     }
     }
     else if (progress == Float.POSITIVE_INFINITY) {
     else if (progress == Float.POSITIVE_INFINITY) {
       progress = 1;
       progress = 1;
-      LOG.warn("Illegal progress value found, progress is " +
+      LOG.debug("Illegal progress value found, progress is " +
         "Float.POSITIVE_INFINITY. Progress will be changed to 1");
         "Float.POSITIVE_INFINITY. Progress will be changed to 1");
     }
     }
     this.progress = progress;
     this.progress = progress;