hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r752926 - in /hadoop/core/branches/branch-0.20: CHANGES.txt src/mapred/org/apache/hadoop/mapred/JobHistory.java src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
Date Thu, 12 Mar 2009 16:42:57 GMT
Author: ddas
Date: Thu Mar 12 16:42:56 2009
New Revision: 752926

URL: http://svn.apache.org/viewvc?rev=752926&view=rev
Log:
HADOOP-5278. Applied the patch on the 0.20 branch as well.

Modified:
    hadoop/core/branches/branch-0.20/CHANGES.txt
    hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobHistory.java
    hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java

Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=752926&r1=752925&r2=752926&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Thu Mar 12 16:42:56 2009
@@ -703,6 +703,9 @@
     HADOOP-5276. Fixes a problem to do with updating the start time of a task when
     the tracker that ran the task is lost. (Amar Kamat via ddas)
 
+    HADOOP-5278. Fixes a problem to do with logging the finish time of a task 
+    during recovery (after a JobTracker restart). (Amar Kamat via ddas)
+
 Release 0.19.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobHistory.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobHistory.java?rev=752926&r1=752925&r2=752926&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobHistory.java (original)
+++ hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobHistory.java Thu
Mar 12 16:42:56 2009
@@ -1180,6 +1180,26 @@
         }
       }
     }
+
+    /**
+     * Update the finish time of task. 
+     * @param taskId task id
+     * @param finishTime finish time of task in ms
+     */
+    public static void logUpdates(TaskID taskId, long finishTime){
+      if (!disableHistory){
+        ArrayList<PrintWriter> writer = openJobs.get(JOBTRACKER_UNIQUE_STRING 
+                                                     + taskId.getJobID()); 
+
+        if (null != writer){
+          JobHistory.log(writer, RecordTypes.Task, 
+                         new Keys[]{Keys.TASKID, Keys.FINISH_TIME}, 
+                         new String[]{ taskId.toString(), 
+                                       String.valueOf(finishTime)});
+        }
+      }
+    }
+
     /**
      * Log job failed event.
      * @param taskId task id

Modified: hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java?rev=752926&r1=752925&r2=752926&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
(original)
+++ hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/TaskInProgress.java
Thu Mar 12 16:42:56 2009
@@ -260,6 +260,7 @@
    */
   public void setExecFinishTime(long finishTime) {
     execFinishTime = finishTime;
+    JobHistory.Task.logUpdates(id, execFinishTime); // log the update
   }
   
   /**



Mime
View raw message