Browse Source

MAPREDUCE-5183. In, TaskTracker#reportProgress logging of 0.0-1.0 progress is followed by percent sign. Contributed by Niranjan Singh.

Harsh J 10 years ago
parent
commit
552bafde0f
2 changed files with 5 additions and 2 deletions
  1. 3 0
      CHANGES.txt
  2. 2 2
      src/mapred/org/apache/hadoop/mapred/TaskTracker.java

+ 3 - 0
CHANGES.txt

@@ -66,6 +66,9 @@ Release 1.3.0 - unreleased
 
   BUG FIXES
 
+    MAPREDUCE-5183. In, TaskTracker#reportProgress logging of 0.0-1.0 progress
+    is followed by percent sign (Niranjan Singh via harsh)
+
     MAPREDUCE-5660. Log info about possible thrashing (when using
     memory-based scheduling in Capacity Scheduler) is not printed
     (Adam Kawa via harsh)

+ 2 - 2
src/mapred/org/apache/hadoop/mapred/TaskTracker.java

@@ -2936,8 +2936,8 @@ public class TaskTracker implements MRConstants, TaskUmbilicalProtocol,
      */
     public synchronized void reportProgress(TaskStatus taskStatus) 
     {
-      LOG.info(task.getTaskID() + " " + taskStatus.getProgress() + 
-          "% " + taskStatus.getStateString());
+      LOG.info(task.getTaskID() + " " + StringUtils.formatPercent(
+          taskStatus.getProgress(), 0) + " " + taskStatus.getStateString());
       // task will report its state as
       // COMMIT_PENDING when it is waiting for commit response and 
       // when it is committing.