Browse Source

YARN-4421. Remove dead code in RmAppImpl.RMAppRecoveredTransition. (Daniel Templeton via rohithsharmaks)

(cherry picked from commit a5e2e1ecb06a3942903cb79f61f0f4bb02480f19)
rohithsharmaks 9 years ago
parent
commit
5bc33c5ae4

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -1034,6 +1034,9 @@ Release 2.8.0 - UNRELEASED
     YARN-4431. Not necessary to do unRegisterNM() if NM get stop due to failed to connect
     YARN-4431. Not necessary to do unRegisterNM() if NM get stop due to failed to connect
     to RM. (Junping Du via rohithsharmaks)
     to RM. (Junping Du via rohithsharmaks)
 
 
+    YARN-4421. Remove dead code in RmAppImpl.RMAppRecoveredTransition.
+    (Daniel Templeton via rohithsharmaks)
+
 Release 2.7.3 - UNRELEASED
 Release 2.7.3 - UNRELEASED
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 0 - 10
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java

@@ -983,16 +983,6 @@ public class RMAppImpl implements RMApp, Recoverable {
       // recover attempts
       // recover attempts
       app.recoverAppAttempts();
       app.recoverAppAttempts();
 
 
-      // 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
       // YARN-1507 is saving the application state after the application is
       // accepted. So after YARN-1507, an app is saved meaning it is accepted.
       // accepted. So after YARN-1507, an app is saved meaning it is accepted.
       // Thus we return ACCECPTED state on recovery.
       // Thus we return ACCECPTED state on recovery.