tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jh...@apache.org
Subject [46/50] [abbrv] git commit: TAJO-1113: SubQuery in KILLED state should handle unexpected events.
Date Wed, 15 Oct 2014 09:17:16 GMT
TAJO-1113: SubQuery in KILLED state should handle unexpected events.

Closes #199


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

Branch: refs/heads/block_iteration
Commit: 3d334f3f45443b4d39a4d029de2482e5629a6e10
Parents: 22c43c0
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Sat Oct 11 15:14:04 2014 -0700
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Sat Oct 11 21:56:52 2014 -0700

----------------------------------------------------------------------
 CHANGES                                         |  3 +++
 .../tajo/master/querymaster/SubQuery.java       | 20 +++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/3d334f3f/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index d1618c9..d4ce498 100644
--- a/CHANGES
+++ b/CHANGES
@@ -168,6 +168,9 @@ Release 0.9.0 - unreleased
 
   BUG FIXES
 
+    TAJO-1113: SubQuery in KILLED state should handle unexpected events.
+    (hyunsik)
+
     TAJO-1111: TestKillQuery.testKillQueryFromInitState occasionally fails.
     (hyunsik)
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/3d334f3f/tajo-core/src/main/java/org/apache/tajo/master/querymaster/SubQuery.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/master/querymaster/SubQuery.java b/tajo-core/src/main/java/org/apache/tajo/master/querymaster/SubQuery.java
index 1f348ff..907fc65 100644
--- a/tajo-core/src/main/java/org/apache/tajo/master/querymaster/SubQuery.java
+++ b/tajo-core/src/main/java/org/apache/tajo/master/querymaster/SubQuery.java
@@ -215,6 +215,24 @@ public class SubQuery implements EventHandler<SubQueryEvent> {
                   SubQueryEventType.SQ_KILL,
                   SubQueryEventType.SQ_CONTAINER_ALLOCATED))
 
+          // Transitions from KILLED state
+          .addTransition(SubQueryState.KILLED, SubQueryState.KILLED,
+              SubQueryEventType.SQ_CONTAINER_ALLOCATED,
+              CONTAINERS_CANCEL_TRANSITION)
+          .addTransition(SubQueryState.KILLED, SubQueryState.KILLED,
+              SubQueryEventType.SQ_DIAGNOSTIC_UPDATE,
+              DIAGNOSTIC_UPDATE_TRANSITION)
+          .addTransition(SubQueryState.KILLED, SubQueryState.ERROR,
+              SubQueryEventType.SQ_INTERNAL_ERROR,
+              INTERNAL_ERROR_TRANSITION)
+              // Ignore-able transitions
+          .addTransition(SubQueryState.KILLED, SubQueryState.KILLED,
+              EnumSet.of(
+                  SubQueryEventType.SQ_START,
+                  SubQueryEventType.SQ_KILL,
+                  SubQueryEventType.SQ_CONTAINER_ALLOCATED,
+                  SubQueryEventType.SQ_FAILED))
+
           // Transitions from FAILED state
           .addTransition(SubQueryState.FAILED, SubQueryState.FAILED,
               SubQueryEventType.SQ_CONTAINER_ALLOCATED,
@@ -233,7 +251,7 @@ public class SubQuery implements EventHandler<SubQueryEvent> {
                   SubQueryEventType.SQ_CONTAINER_ALLOCATED,
                   SubQueryEventType.SQ_FAILED))
 
-          // Transitions from FAILED state
+          // Transitions from ERROR state
           .addTransition(SubQueryState.ERROR, SubQueryState.ERROR,
               SubQueryEventType.SQ_CONTAINER_ALLOCATED,
               CONTAINERS_CANCEL_TRANSITION)


Mime
View raw message