tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject git commit: TEZ-289. DAGAppMasterShutdownHook should not report KILLED when exception brings down AM. (Tsuyoshi Ozawa via hitesh)
Date Fri, 21 Feb 2014 04:25:46 GMT
Repository: incubator-tez
Updated Branches:
  refs/heads/master 8884ee446 -> e4c2a8253


TEZ-289. DAGAppMasterShutdownHook should not report KILLED when exception brings down AM.
(Tsuyoshi Ozawa via hitesh)


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

Branch: refs/heads/master
Commit: e4c2a82533fd8032e78a8c4dda3ff7216f85fc7a
Parents: 8884ee4
Author: Hitesh Shah <hitesh@apache.org>
Authored: Thu Feb 20 20:09:21 2014 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Thu Feb 20 20:09:21 2014 -0800

----------------------------------------------------------------------
 tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/e4c2a825/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java b/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
index d4a96d4..cafcd3c 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
@@ -1544,11 +1544,13 @@ public class DAGAppMaster extends AbstractService {
       }
 
       if (EnumSet.of(DAGAppMasterState.NEW, DAGAppMasterState.INITED,
-          DAGAppMasterState.IDLE, DAGAppMasterState.RUNNING)
-          .contains(appMaster.state)) {
+          DAGAppMasterState.IDLE).contains(appMaster.state)) {
             // DAG not in a final state. Must have receive a KILL signal
         appMaster.state = DAGAppMasterState.KILLED;
+      } else if (appMaster.state == DAGAppMasterState.RUNNING) {
+        appMaster.state = DAGAppMasterState.ERROR;
       }
+
       appMaster.stop();
     }
   }


Mime
View raw message