Browse Source

Merge -r 772919:772920 from trunk onto 0.20 branch. Fixes HADOOP-5636.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.20@772923 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 16 years ago
parent
commit
f41536d9fe
2 changed files with 9 additions and 2 deletions
  1. 4 0
      CHANGES.txt
  2. 5 2
      src/mapred/org/apache/hadoop/mapred/JobInProgress.java

+ 4 - 0
CHANGES.txt

@@ -57,6 +57,10 @@ Release 0.20.1 - Unreleased
     path value that is returned for the case where the file we want to write
     is of an unknown size. (Vinod Kumar Vavilapalli via ddas)
 
+    HADOOP-5636. Prevents a job from going to RUNNING state after it has been
+    KILLED (this used to happen when the SetupTask would come back with a 
+    success after the job has been killed). (Amar Kamat via ddas)
+
 Release 0.20.0 - 2009-04-15
 
   INCOMPATIBLE CHANGES

+ 5 - 2
src/mapred/org/apache/hadoop/mapred/JobInProgress.java

@@ -2046,8 +2046,11 @@ class JobInProgress {
       killSetupTip(!tip.isMapTask());
       // Job can start running now.
       this.status.setSetupProgress(1.0f);
-      this.status.setRunState(JobStatus.RUNNING);
-      JobHistory.JobInfo.logStarted(profile.getJobID());
+      // move the job to running state if the job is in prep state
+      if (this.status.getRunState() == JobStatus.PREP) {
+        this.status.setRunState(JobStatus.RUNNING);
+        JobHistory.JobInfo.logStarted(profile.getJobID());
+      }
     } else if (tip.isJobCleanupTask()) {
       // cleanup task has finished. Kill the extra cleanup tip
       if (tip.isMapTask()) {