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

Hudson commented on YARN-4421:
------------------------------

FAILURE: Integrated in Hadoop-trunk-Commit #8946 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/8946/])
YARN-4421. Remove dead code in RmAppImpl.RMAppRecoveredTransition. 
(rohithsharmaks: rev a5e2e1ecb06a3942903cb79f61f0f4bb02480f19)
* 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java
* hadoop-yarn-project/CHANGES.txt


> Remove dead code in RmAppImpl.RMAppRecoveredTransition
> ------------------------------------------------------
>
>                 Key: YARN-4421
>                 URL: https://issues.apache.org/jira/browse/YARN-4421
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>            Reporter: Daniel Templeton
>            Assignee: Daniel Templeton
>            Priority: Trivial
>             Fix For: 2.8.0
>
>         Attachments: YARN-4421.001.patch
>
>
> The {{transition()}} method contains the following:
> {code}
>       // Last attempt is in final state, return ACCEPTED waiting for last
>       // RMAppAttempt to send finished or failed event back.
>       if (app.currentAttempt != null
>           && (app.currentAttempt.getState() == RMAppAttemptState.KILLED
>               || app.currentAttempt.getState() == RMAppAttemptState.FINISHED
>               || (app.currentAttempt.getState() == RMAppAttemptState.FAILED
>                   && app.getNumFailedAppAttempts() == app.maxAppAttempts))) {
>         return RMAppState.ACCEPTED;
>       }
>       // YARN-1507 is saving the application state after the application is
>       // accepted. So after YARN-1507, an app is saved meaning it is accepted.
>       // Thus we return ACCECPTED state on recovery.
>       return RMAppState.ACCEPTED;
> {code}
> The {{if}} statement is fully redundant and can be eliminated.



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

Reply via email to