Преглед на файлове

HADOOP-5521. Removes dependency of TestJobInProgress on RESTART_COUNT JobHistory tag. Contributed by Ravi Gummadi.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.20@763217 13f79535-47bb-0310-9956-ffa450edef68
Sharad Agarwal преди 16 години
родител
ревизия
9791c8ae30
променени са 2 файла, в които са добавени 8 реда и са изтрити 6 реда
  1. 3 0
      CHANGES.txt
  2. 5 6
      src/test/org/apache/hadoop/mapred/TestJobHistory.java

+ 3 - 0
CHANGES.txt

@@ -358,6 +358,9 @@ Release 0.20.0 - Unreleased
 
     HADOOP-5437. Fix TestMiniMRDFSSort to properly test jvm-reuse. (omalley)
 
+    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

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

@@ -132,14 +132,13 @@ public class TestJobHistory extends TestCase {
                   "at line " + lineNum, id != null);
         String time = values.get(Keys.LAUNCH_TIME);
         if (time != null) {
-          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 {// JT restart
+          if (isJobLaunched) {
+            // We assume that if we see LAUNCH_TIME again, it is because of JT restart
             isJTRestarted = true;
           }
-          isJobLaunched = true;
+          else {// job launched first time
+            isJobLaunched = true;
+          }
         }
         time = values.get(Keys.FINISH_TIME);
         if (time != null) {