Browse Source

Reverted HADOOP-5521 from branch-0.20. I had committed on bracnh 0.20 by mistake.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.20@755967 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 16 years ago
parent
commit
f0894d6917
2 changed files with 6 additions and 8 deletions
  1. 0 3
      CHANGES.txt
  2. 6 5
      src/test/org/apache/hadoop/mapred/TestJobHistory.java

+ 0 - 3
CHANGES.txt

@@ -351,9 +351,6 @@ Release 0.20.0 - Unreleased
     HADOOP-5275. Add ivy directory and files to built tar.
     (Giridharan Kesavan via nigel)
 
-    HADOOP-5521. Removes dependency of TestJobInProgress on RESTART_COUNT 
-    JobHistory tag. (Ravi Gummadi via ddas)
-
   OPTIMIZATIONS
 
     HADOOP-3293. Fixes FileInputFormat to do provide locations for splits

+ 6 - 5
src/test/org/apache/hadoop/mapred/TestJobHistory.java

@@ -132,13 +132,14 @@ public class TestJobHistory extends TestCase {
                   "at line " + lineNum, id != null);
         String time = values.get(Keys.LAUNCH_TIME);
         if (time != null) {
-          if (isJobLaunched) {
-            // We assume that if we see LAUNCH_TIME again, it is because of JT restart
-            isJTRestarted = true;
+          if (values.get(Keys.RESTART_COUNT) == null) {// restart is fine
+            assertFalse ("Duplicate Job LAUNCH_TIME is seen in history " +
+                         "file at line " + lineNum, isJobLaunched);
           }
-          else {// job launched first time
-            isJobLaunched = true;
+          else {// JT restart
+            isJTRestarted = true;
           }
+          isJobLaunched = true;
         }
         time = values.get(Keys.FINISH_TIME);
         if (time != null) {