hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Templeton (JIRA)" <j...@apache.org>
Subject [jira] [Created] (YARN-4421) Remove dea code in RmAppImpl.RMAppRecoveredTransition
Date Fri, 04 Dec 2015 17:05:11 GMT
Daniel Templeton created YARN-4421:

             Summary: Remove dea code in RmAppImpl.RMAppRecoveredTransition
                 Key: YARN-4421
                 URL: https://issues.apache.org/jira/browse/YARN-4421
             Project: Hadoop YARN
          Issue Type: Improvement
          Components: resourcemanager
            Reporter: Daniel Templeton
            Assignee: Daniel Templeton
            Priority: Minor

The {{transition()}} method contains the following:

      // 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;

The {{if}} statement is fully redundant and can be eliminated.

This message was sent by Atlassian JIRA

View raw message