tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bi...@apache.org
Subject tez git commit: TEZ-2996. TestAnalyzer fails in trunk after recovery redesign (bikas)
Date Tue, 15 Dec 2015 03:22:52 GMT
Repository: tez
Updated Branches:
  refs/heads/master d44d20489 -> 09a6d1a0d


TEZ-2996. TestAnalyzer fails in trunk after recovery redesign (bikas)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/09a6d1a0
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/09a6d1a0
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/09a6d1a0

Branch: refs/heads/master
Commit: 09a6d1a0de17f3ba5ff2a8f344302591c2da65ce
Parents: d44d204
Author: Bikas Saha <bikas@apache.org>
Authored: Mon Dec 14 19:22:37 2015 -0800
Committer: Bikas Saha <bikas@apache.org>
Committed: Mon Dec 14 19:22:37 2015 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../tez/dag/app/dag/impl/TaskAttemptImpl.java   | 26 ++++++++++----------
 2 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/09a6d1a0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 567c972..808bef6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -10,6 +10,7 @@ INCOMPATIBLE CHANGES
   TEZ-604. Revert temporary changes made in TEZ-603 to kill the provided tez session, if
running a MapReduce job.
 
 ALL CHANGES:
+  TEZ-2996. TestAnalyzer fails in trunk after recovery redesign
   TEZ-2987. TestVertexImpl.testTez2684 fails
   TEZ-2995. Timeline primary filter should only be on callerId and not type.
   TEZ-2994. LocalProgress in tez-runtime-library missing Apache header, rat check warnings
from the new licenses after TEZ-2592 merge.

http://git-wip-us.apache.org/repos/asf/tez/blob/09a6d1a0/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
index bd65b8d..dda4891 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
@@ -1168,8 +1168,6 @@ public class TaskAttemptImpl implements TaskAttempt,
 
       TaskAttemptEventSchedule scheduleEvent = (TaskAttemptEventSchedule) event;
       ta.scheduledTime = ta.clock.getTime();
-      // TODO Creating the remote task here may not be required in case of
-      // recovery.
 
       // Create the remote task.
       TaskSpec remoteTaskSpec;
@@ -1257,26 +1255,28 @@ public class TaskAttemptImpl implements TaskAttempt,
     public void transition(TaskAttemptImpl ta, TaskAttemptEvent event) {
       // This transition should not be invoked directly, if a scheduler event has already
been sent out.
       // Sub-classes should be used if a scheduler request has been sent.
-      if (ta.recoveryData == null ||
-          ta.recoveryData.getTaskAttemptFinishedEvent() == null) {
-        ta.setFinishTime();
-        ta.logJobHistoryAttemptUnsuccesfulCompletion(helper
-            .getTaskAttemptState());
-      } else {
-        ta.finishTime = ta.recoveryData.getTaskAttemptFinishedEvent().getFinishTime();
-      }
 
+      // in both normal and recovery flow make sure diagnostics etc. are correctly assigned
       if (event instanceof DiagnosableEvent) {
         ta.addDiagnosticInfo(((DiagnosableEvent) event).getDiagnosticInfo());
       }
-      
       if (event instanceof TaskAttemptEventTerminationCauseEvent) {
         ta.trySetTerminationCause(((TaskAttemptEventTerminationCauseEvent) event).getTerminationCause());
       } else {
         throw new TezUncheckedException("Invalid event received in TerminateTransition"
-            + ", requiredClass=TaskAttemptEventTerminationCauseEvent"
-            + ", eventClass=" + event.getClass().getName());
+                + ", requiredClass=TaskAttemptEventTerminationCauseEvent"
+                + ", eventClass=" + event.getClass().getName());
       }
+
+      if (ta.recoveryData == null ||
+          ta.recoveryData.getTaskAttemptFinishedEvent() == null) {
+        ta.setFinishTime();
+        ta.logJobHistoryAttemptUnsuccesfulCompletion(helper
+            .getTaskAttemptState());
+      } else {
+        ta.finishTime = ta.recoveryData.getTaskAttemptFinishedEvent().getFinishTime();
+      }
+
       if (event instanceof RecoveryEvent) {
         RecoveryEvent rEvent = (RecoveryEvent)event;
         if (rEvent.isFromRecovery()) {


Mime
View raw message