tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-3148. Invalid event TA_TEZ_EVENT_UPDATE on TaskAttempt. (Tsuyoshi Ozawa via hitesh)
Date Mon, 14 Mar 2016 18:48:24 GMT
Repository: tez
Updated Branches:
  refs/heads/master eea8a0e2a -> 65c4dc678


TEZ-3148. Invalid event TA_TEZ_EVENT_UPDATE on TaskAttempt. (Tsuyoshi Ozawa via hitesh)


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

Branch: refs/heads/master
Commit: 65c4dc67872437549a2a51e3cbe02b34f50e784c
Parents: eea8a0e
Author: Hitesh Shah <hitesh@apache.org>
Authored: Mon Mar 14 11:45:56 2016 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Mon Mar 14 11:45:56 2016 -0700

----------------------------------------------------------------------
 CHANGES.txt                                      |  1 +
 .../tez/dag/app/dag/impl/TaskAttemptImpl.java    |  3 +++
 .../tez/dag/app/dag/impl/TestTaskAttempt.java    | 19 +++++++++++++++++++
 3 files changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/65c4dc67/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d26f7c6..2c87be5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES
   TEZ-3029. Add an onError method to service plugin contexts.
 
 ALL CHANGES:
+  TEZ-3148. Invalid event TA_TEZ_EVENT_UPDATE on TaskAttempt.
   TEZ-3105. TezMxBeanResourceCalculator does not work on IBM JDK 7 or 8 causing Tez failures.
   TEZ-3155. Support a way to submit DAGs to a session where the DAG plan exceeds hadoop ipc
limits.
   TEZ-2863. Container, node, and logs not available in UI for tasks that fail to launch

http://git-wip-us.apache.org/repos/asf/tez/blob/65c4dc67/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 1598f2d..6f44f3d 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
@@ -361,6 +361,7 @@ public class TaskAttemptImpl implements TaskAttempt,
           TaskAttemptStateInternal.KILL_IN_PROGRESS,
           EnumSet.of(TaskAttemptEventType.TA_STARTED_REMOTELY,
               TaskAttemptEventType.TA_CONTAINER_TERMINATED_BY_SYSTEM,
+              TaskAttemptEventType.TA_TEZ_EVENT_UPDATE,
               TaskAttemptEventType.TA_STATUS_UPDATE,
               TaskAttemptEventType.TA_DONE, TaskAttemptEventType.TA_FAILED,
               TaskAttemptEventType.TA_TIMED_OUT,
@@ -379,6 +380,7 @@ public class TaskAttemptImpl implements TaskAttempt,
           TaskAttemptStateInternal.FAIL_IN_PROGRESS,
           EnumSet.of(TaskAttemptEventType.TA_STARTED_REMOTELY,
               TaskAttemptEventType.TA_CONTAINER_TERMINATED_BY_SYSTEM,
+              TaskAttemptEventType.TA_TEZ_EVENT_UPDATE,
               TaskAttemptEventType.TA_STATUS_UPDATE,
               TaskAttemptEventType.TA_DONE, TaskAttemptEventType.TA_FAILED,
               TaskAttemptEventType.TA_TIMED_OUT,
@@ -394,6 +396,7 @@ public class TaskAttemptImpl implements TaskAttempt,
           EnumSet.of(TaskAttemptEventType.TA_STARTED_REMOTELY,
               TaskAttemptEventType.TA_SCHEDULE,
               TaskAttemptEventType.TA_CONTAINER_TERMINATED_BY_SYSTEM,
+              TaskAttemptEventType.TA_TEZ_EVENT_UPDATE,
               TaskAttemptEventType.TA_STATUS_UPDATE,
               TaskAttemptEventType.TA_DONE, TaskAttemptEventType.TA_FAILED,
               TaskAttemptEventType.TA_TIMED_OUT,

http://git-wip-us.apache.org/repos/asf/tez/blob/65c4dc67/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
index c5dfbc1..feb7585 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
@@ -33,6 +33,7 @@ import static org.mockito.Mockito.when;
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -87,6 +88,7 @@ import org.apache.tez.dag.app.dag.event.TaskAttemptEventOutputFailed;
 import org.apache.tez.dag.app.dag.event.TaskAttemptEventSchedule;
 import org.apache.tez.dag.app.dag.event.TaskAttemptEventStartedRemotely;
 import org.apache.tez.dag.app.dag.event.TaskAttemptEventStatusUpdate;
+import org.apache.tez.dag.app.dag.event.TaskAttemptEventTezEventUpdate;
 import org.apache.tez.dag.app.dag.event.TaskAttemptEventType;
 import org.apache.tez.dag.app.dag.event.TaskEvent;
 import org.apache.tez.dag.app.dag.event.TaskEventTAUpdate;
@@ -328,6 +330,11 @@ public class TestTaskAttempt {
     // At state STARTING.
     taImpl.handle(new TaskAttemptEventKillRequest(taskAttemptID, null,
         TaskAttemptTerminationCause.TERMINATED_BY_CLIENT));
+    assertEquals(TaskAttemptStateInternal.KILL_IN_PROGRESS, taImpl.getInternalState());
+    taImpl.handle(new TaskAttemptEventTezEventUpdate(taImpl.getID(), Collections.EMPTY_LIST));
+    assertFalse(
+        "InternalError occurred trying to handle TA_TEZ_EVENT_UPDATE in KILL_IN_PROGRESS
state",
+        eventHandler.internalError);
     // At some KILLING state.
     taImpl.handle(new TaskAttemptEventKillRequest(taskAttemptID, null,
         TaskAttemptTerminationCause.TERMINATED_BY_CLIENT));
@@ -747,6 +754,12 @@ public class TestTaskAttempt {
     assertEquals("0", taImpl.getDiagnostics().get(0));
     assertEquals(TaskAttemptTerminationCause.APPLICATION_ERROR, taImpl.getTerminationCause());
 
+    assertEquals(TaskAttemptStateInternal.FAIL_IN_PROGRESS, taImpl.getInternalState());
+    taImpl.handle(new TaskAttemptEventTezEventUpdate(taImpl.getID(), Collections.EMPTY_LIST));
+    assertFalse(
+        "InternalError occurred trying to handle TA_TEZ_EVENT_UPDATE in FAIL_IN_PROGRESS
state",
+        eventHandler.internalError);
+
     taImpl.handle(new TaskAttemptEventContainerTerminated(contId, taskAttemptID, "1",
         TaskAttemptTerminationCause.CONTAINER_EXITED));
     // verify unregister is not invoked again
@@ -1175,6 +1188,12 @@ public class TestTaskAttempt {
     assertEquals("Task attempt is not in the  KILLED state", TaskAttemptState.KILLED,
         taImpl.getState());
     assertEquals(TaskAttemptTerminationCause.NODE_FAILED, taImpl.getTerminationCause());
+
+    assertEquals(TaskAttemptStateInternal.KILLED, taImpl.getInternalState());
+    taImpl.handle(new TaskAttemptEventTezEventUpdate(taImpl.getID(), Collections.EMPTY_LIST));
+    assertFalse(
+        "InternalError occurred trying to handle TA_TEZ_EVENT_UPDATE in KILLED state",
+        eventHandler.internalError);
   }
   
   @Test(timeout = 5000)


Mime
View raw message