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

Jeff Zhang commented on TEZ-1748:
---------------------------------

[~sseth], The reason I make this change is that I found currently the different 
behavior of Termination Transition only depends on its current state and target 
state, not depend on the event. And when read the code first time, so many 
different TerminationTranstion looks like not clean
So I move the common work into finished() method and do corresponding work 
based on its current state and target state. 


> Refactoring - Conslidate the Transition in TaskAttemptImpl
> ----------------------------------------------------------
>
>                 Key: TEZ-1748
>                 URL: https://issues.apache.org/jira/browse/TEZ-1748
>             Project: Apache Tez
>          Issue Type: Bug
>    Affects Versions: 0.5.1
>            Reporter: Jeff Zhang
>            Assignee: Jeff Zhang
>         Attachments: TEZ-1748.patch
>
>
> 2 points:
> * Some common work needs to be done when TaskAttempt is completed 
> (succeeded/killed/failed), like send event to Task, send event to 
> AMScheduler( it depends on current state ), unregister taskHeartbeatHandler 
> (it depends on current state), we could put them in one places like 
> TaskAttemptImpl.finished(TaskAttemptState)
> * There're many kinds of TerminationTransition, most of them are very 
> similar, can consolidate them into one or two Transition



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

Reply via email to