Browse Source

commit c8942d7260f7331b9aac5846b1472824f69e43f9
Author: Lee Tucker <ltucker@yahoo-inc.com>
Date: Thu Jul 30 17:40:49 2009 -0700

Applying patch 2925597.mr809.patch


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1076963 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 years ago
parent
commit
92f8f13c58
1 changed files with 10 additions and 3 deletions
  1. 10 3
      src/mapred/org/apache/hadoop/mapred/JobInProgress.java

+ 10 - 3
src/mapred/org/apache/hadoop/mapred/JobInProgress.java

@@ -2324,14 +2324,16 @@ class JobInProgress {
   private synchronized void terminateJob(int jobTerminationState) {
     if ((status.getRunState() == JobStatus.RUNNING) ||
         (status.getRunState() == JobStatus.PREP)) {
-      // Log the job summary
-      JobSummary.logJobSummary(this, jobtracker.getClusterStatus(false));
-      
       if (jobTerminationState == JobStatus.FAILED) {
         this.status = new JobStatus(status.getJobID(),
                                     1.0f, 1.0f, 1.0f, JobStatus.FAILED,
                                     status.getJobPriority());
         this.finishTime = System.currentTimeMillis();
+
+        // Log the job summary
+        JobSummary.logJobSummary(this, jobtracker.getClusterStatus(false));
+        
+        // Log to job-history
         JobHistory.JobInfo.logFailed(this.status.getJobID(), finishTime, 
                                      this.finishedMapTasks, 
                                      this.finishedReduceTasks);
@@ -2340,6 +2342,11 @@ class JobInProgress {
                                     1.0f, 1.0f, 1.0f, JobStatus.KILLED,
                                     status.getJobPriority());
         this.finishTime = System.currentTimeMillis();
+
+        // Log the job summary
+        JobSummary.logJobSummary(this, jobtracker.getClusterStatus(false));
+        
+        // Log to job-history
         JobHistory.JobInfo.logKilled(this.status.getJobID(), finishTime, 
                                      this.finishedMapTasks, 
                                      this.finishedReduceTasks);