tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjf...@apache.org
Subject tez git commit: TEZ-3066. TaskAttemptFinishedEvent ConcurrentModificationException in recovery or history logging services (zjffdu)
Date Fri, 22 Jan 2016 05:44:34 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.7 2cbf40248 -> b80cea95f


TEZ-3066. TaskAttemptFinishedEvent ConcurrentModificationException in recovery or history
logging services (zjffdu)

(cherry picked from commit 2bf27de3bfbe7a54fbf2982fa50ab6b32974d6b1)


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

Branch: refs/heads/branch-0.7
Commit: b80cea95f3bea4ac32ed386e77e56a75c6dd7bf9
Parents: 2cbf402
Author: Jeff Zhang <zjffdu@apache.org>
Authored: Thu Jan 21 21:32:59 2016 -0800
Committer: Jeff Zhang <zjffdu@apache.org>
Committed: Thu Jan 21 21:44:26 2016 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../tez/dag/app/dag/impl/TaskAttemptImpl.java   | 24 +++++++++++++-------
 2 files changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/b80cea95/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f40029a..014a852 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES
   TEZ-2972. Avoid task rescheduling when a node turns unhealthy
 
 ALL CHANGES
+  TEZ-3066. TaskAttemptFinishedEvent ConcurrentModificationException in recovery or history
logging services.
   TEZ-3036. Tez AM can hang on startup with no indication of error
   TEZ-3052. Task internal error due to Invalid event: T_ATTEMPT_FAILED at FAILED
   TEZ-3046. Compilation issue in tez-runtime-internals of branch-0.7

http://git-wip-us.apache.org/repos/asf/tez/blob/b80cea95/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 98b1681..75082da 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
@@ -1760,15 +1760,23 @@ public class TaskAttemptImpl implements TaskAttempt,
   public void setLastEventSent(TezEvent lastEventSent) {
     writeLock.lock();
     try {
-      DataEventDependencyInfo info = new DataEventDependencyInfo(
+      // TEZ-3066 ideally Heartbeat just happens in FAIL_IN_PROGRESS & KILL_IN_PROGRESS,
+      // add other states here just in case. create TEZ-3068 for a more elegant solution.
+      if (!EnumSet.of(TaskAttemptStateInternal.FAIL_IN_PROGRESS,
+        TaskAttemptStateInternal.KILL_IN_PROGRESS,
+        TaskAttemptStateInternal.FAILED,
+        TaskAttemptStateInternal.KILLED,
+        TaskAttemptStateInternal.SUCCEEDED).contains(getInternalState())) {
+        DataEventDependencyInfo info = new DataEventDependencyInfo(
           lastEventSent.getEventReceivedTime(), lastEventSent.getSourceInfo().getTaskAttemptID());
-      // task attempt id may be null for input data information events
-      if (appendNextDataEvent) {
-        appendNextDataEvent = false;
-        lastDataEvents.add(info);
-      } else {
-        // over-write last event - array list makes it quick
-        lastDataEvents.set(lastDataEvents.size() - 1, info);
+        // task attempt id may be null for input data information events
+        if (appendNextDataEvent) {
+          appendNextDataEvent = false;
+          lastDataEvents.add(info);
+        } else {
+          // over-write last event - array list makes it quick
+          lastDataEvents.set(lastDataEvents.size() - 1, info);
+        }
       }
     } finally {
       writeLock.unlock();


Mime
View raw message