[ 
https://issues.apache.org/jira/browse/TEZ-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14555583#comment-14555583
 ] 

Jeff Zhang commented on TEZ-1273:
---------------------------------

|| || NEW || INITED || RECOVERING || RUNNING || IDLE || TERMINATING || 
SUCCEEDED || FAILED || KILLED || ERROR ||
|| SHUTDOWN | | | | Kill the current dag, move to TERMINATING to wait for the 
dag to be completed | Invoke shutdown handler (unregisterWithRM),Go to 
SUCCEEDED | Ignore | Ignore | Ignore | Ignore|
|| INTERNAL_ERROR | | | | Kill the current dag, move to TERMINATING to Wait for 
the dag to be completed | Invoke shutdown handler (unregisterWithRM), Go to 
ERROR | Ignore | Ignore | Ignore | Ignore|
|| SESSION_TIMEOUT | | | | | Invoke shutdown handler (unregisterWithRM),  Go to 
SUCCEEDED | Ignore | Ignore | Ignore | Ignore|
|| AM_REBOOT | | | | Invoke the shutdown handler (no unregisterWithRM), Go to 
ERROR | Invoke the shutdown handler (no unregisterWithRM), Go to KILLED | 
Invoke the shutdown handler (no unregisterWithRM), Go to KILLED |  Ignore | 
Ignore | Ignore|
|| SCHEDULING_SERVICE_ERROR  | | | | Invoke the shutdown handler (no 
unregisterWithRM), Go to ERROR | Invoke the shutdown handler (no 
unregisterWithRM), Go to ERROR | Invoke the shutdown handler (no 
unregisterWithRM), Go to ERROR | Ignore | Ignore | Ignore|

* These events above won't happen in RECOVERING state, because recovering 
happens in the same thread of dispatcher. So if these events happens when AM is 
in recovering, first they will be put on the event queue. After the 
RecoveryTransition complete, AM has already move to other state.
* In the case of internal error (invalid state machine transition of AM),  AM 
will be shutdown without killing the current dag, and unregister with RM
* In the case of dispatcher error (any error that is not caught by state 
machine transition), the AM's JVM shutdownhook will be invoked. 






> Refactor DAGAppMaster to state machine based
> --------------------------------------------
>
>                 Key: TEZ-1273
>                 URL: https://issues.apache.org/jira/browse/TEZ-1273
>             Project: Apache Tez
>          Issue Type: Improvement
>    Affects Versions: 0.4.0
>            Reporter: Jeff Zhang
>            Assignee: Jeff Zhang
>         Attachments: DAGAppMaster_3.pdf, DAGAppMaster_4.pdf, 
> TEZ-1273-3.patch, TEZ-1273-4.patch, TEZ-1273-5.patch, TEZ-1273-6.patch, 
> TEZ-1273-7.patch, Tez-1273-2.patch, Tez-1273.patch, dag_app_master.pdf, 
> dag_app_master2.pdf
>
>
> Almost all our entities (Vertex, Task etc) are state machine based and 
> written using a formal state machine. But DAGAppMaster is not written on a 
> formal state machine even though it has a state machine based behavior. This 
> jira is for refactoring it into state machine based



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to