Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-4421

Remove dead code in RmAppImpl.RMAppRecoveredTransition

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: resourcemanager
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      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.

      1. YARN-4421.001.patch
        2 kB
        Daniel Templeton

        Activity

        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        +1 mvninstall 7m 51s trunk passed
        +1 compile 0m 29s trunk passed with JDK v1.8.0_66
        +1 compile 0m 32s trunk passed with JDK v1.7.0_85
        +1 checkstyle 0m 13s trunk passed
        +1 mvnsite 0m 38s trunk passed
        +1 mvneclipse 0m 15s trunk passed
        +1 findbugs 1m 16s trunk passed
        +1 javadoc 0m 24s trunk passed with JDK v1.8.0_66
        +1 javadoc 0m 28s trunk passed with JDK v1.7.0_85
        +1 mvninstall 0m 35s the patch passed
        +1 compile 0m 28s the patch passed with JDK v1.8.0_66
        +1 javac 0m 28s the patch passed
        +1 compile 0m 31s the patch passed with JDK v1.7.0_85
        +1 javac 0m 31s the patch passed
        +1 checkstyle 0m 13s the patch passed
        +1 mvnsite 0m 38s the patch passed
        +1 mvneclipse 0m 15s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 25s the patch passed
        +1 javadoc 0m 23s the patch passed with JDK v1.8.0_66
        +1 javadoc 0m 27s the patch passed with JDK v1.7.0_85
        -1 unit 66m 32s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.8.0_66.
        -1 unit 65m 48s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_85.
        +1 asflicense 0m 23s Patch does not generate ASF License warnings.
        150m 53s



        Reason Tests
        JDK v1.8.0_66 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens
          hadoop.yarn.server.resourcemanager.TestAMAuthorization
          hadoop.yarn.server.resourcemanager.scheduler.fifo.TestFifoScheduler
        JDK v1.7.0_85 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens
          hadoop.yarn.server.resourcemanager.TestAMAuthorization



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12775803/YARN-4421.001.patch
        JIRA Issue YARN-4421
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux fd9f30208161 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / e84d6ca
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-YARN-Build/9863/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_66.txt
        unit https://builds.apache.org/job/PreCommit-YARN-Build/9863/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_85.txt
        unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/9863/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-YARN-Build/9863/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_85.txt
        JDK v1.7.0_85 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9863/testReport/
        modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
        Max memory used 76MB
        Powered by Apache Yetus http://yetus.apache.org
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/9863/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 7m 51s trunk passed +1 compile 0m 29s trunk passed with JDK v1.8.0_66 +1 compile 0m 32s trunk passed with JDK v1.7.0_85 +1 checkstyle 0m 13s trunk passed +1 mvnsite 0m 38s trunk passed +1 mvneclipse 0m 15s trunk passed +1 findbugs 1m 16s trunk passed +1 javadoc 0m 24s trunk passed with JDK v1.8.0_66 +1 javadoc 0m 28s trunk passed with JDK v1.7.0_85 +1 mvninstall 0m 35s the patch passed +1 compile 0m 28s the patch passed with JDK v1.8.0_66 +1 javac 0m 28s the patch passed +1 compile 0m 31s the patch passed with JDK v1.7.0_85 +1 javac 0m 31s the patch passed +1 checkstyle 0m 13s the patch passed +1 mvnsite 0m 38s the patch passed +1 mvneclipse 0m 15s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 25s the patch passed +1 javadoc 0m 23s the patch passed with JDK v1.8.0_66 +1 javadoc 0m 27s the patch passed with JDK v1.7.0_85 -1 unit 66m 32s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.8.0_66. -1 unit 65m 48s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_85. +1 asflicense 0m 23s Patch does not generate ASF License warnings. 150m 53s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens   hadoop.yarn.server.resourcemanager.TestAMAuthorization   hadoop.yarn.server.resourcemanager.scheduler.fifo.TestFifoScheduler JDK v1.7.0_85 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens   hadoop.yarn.server.resourcemanager.TestAMAuthorization Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12775803/YARN-4421.001.patch JIRA Issue YARN-4421 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux fd9f30208161 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / e84d6ca findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-YARN-Build/9863/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-YARN-Build/9863/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_85.txt unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/9863/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-YARN-Build/9863/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_85.txt JDK v1.7.0_85 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/9863/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager Max memory used 76MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-YARN-Build/9863/console This message was automatically generated.
        Hide
        rohithsharma Rohith Sharma K S added a comment -

        Initially in RM restart feature, there was some code that doing functionality handling between those 2 lines. Later on because of improvements/bug, it has been removed which looking now as dead code. It can be removed now.

        Show
        rohithsharma Rohith Sharma K S added a comment - Initially in RM restart feature, there was some code that doing functionality handling between those 2 lines. Later on because of improvements/bug, it has been removed which looking now as dead code. It can be removed now.
        Hide
        rohithsharma Rohith Sharma K S added a comment -

        committed to trunk/branch-2/branch-2.8.. thanks Daniel Templeton for the patch!!

        Show
        rohithsharma Rohith Sharma K S added a comment - committed to trunk/branch-2/branch-2.8.. thanks Daniel Templeton for the patch!!
        Hide
        hudson Hudson added a comment -

        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
        Show
        hudson Hudson added a comment - 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
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #679 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/679/)
        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
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #679 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/679/ ) 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

          People

          • Assignee:
            templedf Daniel Templeton
            Reporter:
            templedf Daniel Templeton
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development