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

The YarnApplicationState is always running in ATS no matter the application is running or finishes.

    Details

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

      Description

      After YARN-5029, we add one more event : APP_STATE_UPDATE event which is used by RM to sync up the App state between Timeline Server. But when we get appReport from TimelineServer, we parse all events with timestamp descending order (Finish event-->App State update event --> create event) which causes this issue.

      1. YARN-5100.2.patch
        4 kB
        Xuan Gong
      2. YARN-5100.1.patch
        4 kB
        Xuan Gong

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-trunk-Commit #9824 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9824/)
        YARN-5100. The YarnApplicationState is always running in ATS even (junping_du: rev 141873ca7d68619e3458712b17aed57fec8fd7c8)

        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryManagerOnTimelineStore.java
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #9824 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9824/ ) YARN-5100 . The YarnApplicationState is always running in ATS even (junping_du: rev 141873ca7d68619e3458712b17aed57fec8fd7c8) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryManagerOnTimelineStore.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
        Hide
        djp Junping Du added a comment -

        Commit to branch-2.8 as well given offline request from Xuan.

        Show
        djp Junping Du added a comment - Commit to branch-2.8 as well given offline request from Xuan.
        Hide
        djp Junping Du added a comment -

        I have commit the latest patch to trunk and branch-2. Thanks Xuan Gong for patch contribution!

        Show
        djp Junping Du added a comment - I have commit the latest patch to trunk and branch-2. Thanks Xuan Gong for patch contribution!
        Hide
        djp Junping Du added a comment -

        v2 patch LGTM. Will commit it tomorrow if no further comments.

        Show
        djp Junping Du added a comment - v2 patch LGTM. Will commit it tomorrow if no further comments.
        Hide
        xgong Xuan Gong added a comment -

        Junping Du
        The testcase failure is not related. Create https://issues.apache.org/jira/browse/YARN-5108 to track that

        Show
        xgong Xuan Gong added a comment - Junping Du The testcase failure is not related. Create https://issues.apache.org/jira/browse/YARN-5108 to track that
        Hide
        djp Junping Du added a comment -

        This would affect YARN_APPLICATION_UPDATED event as well, but I have created a separate jira : https://issues.apache.org/jira/browse/YARN-5101 to check that issue.

        I see. Tracking this issue in another jira sounds good to me, and we can discuss if any other consideration should be taken.

        Remind by check-style report, the method of convertToApplicationReport() should be refactored to something shorter and more readable. Given this is a legacy issue, we can file a separated JIRA to fix this. Xuan Gong, does unit test failure related to your patch here? If not, do we have JIRA to track the test issue?

        Show
        djp Junping Du added a comment - This would affect YARN_APPLICATION_UPDATED event as well, but I have created a separate jira : https://issues.apache.org/jira/browse/YARN-5101 to check that issue. I see. Tracking this issue in another jira sounds good to me, and we can discuss if any other consideration should be taken. Remind by check-style report, the method of convertToApplicationReport() should be refactored to something shorter and more readable. Given this is a legacy issue, we can file a separated JIRA to fix this. Xuan Gong , does unit test failure related to your patch here? If not, do we have JIRA to track the test issue?
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 6m 53s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 7m 29s trunk passed
        +1 compile 0m 18s trunk passed
        +1 checkstyle 0m 16s trunk passed
        +1 mvnsite 0m 21s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 0m 34s trunk passed
        +1 javadoc 0m 16s trunk passed
        +1 mvninstall 0m 20s the patch passed
        +1 compile 0m 17s the patch passed
        +1 javac 0m 17s the patch passed
        -1 checkstyle 0m 13s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice: patch generated 1 new + 99 unchanged - 1 fixed = 100 total (was 100)
        +1 mvnsite 0m 22s the patch passed
        +1 mvneclipse 0m 11s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 0m 42s the patch passed
        +1 javadoc 0m 15s the patch passed
        -1 unit 3m 10s hadoop-yarn-server-applicationhistoryservice in the patch failed.
        +1 asflicense 0m 18s Patch does not generate ASF License warnings.
        22m 47s



        Reason Tests
        Failed junit tests hadoop.yarn.server.applicationhistoryservice.TestFileSystemApplicationHistoryStore



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:2c91fd8
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12804470/YARN-5100.2.patch
        JIRA Issue YARN-5100
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux f120d46399e7 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 / 34fddd1
        Default Java 1.8.0_91
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-YARN-Build/11503/artifact/patchprocess/diff-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice.txt
        unit https://builds.apache.org/job/PreCommit-YARN-Build/11503/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice.txt
        unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/11503/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice.txt
        Test Results https://builds.apache.org/job/PreCommit-YARN-Build/11503/testReport/
        modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/11503/console
        Powered by Apache Yetus 0.2.0 http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 6m 53s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 29s trunk passed +1 compile 0m 18s trunk passed +1 checkstyle 0m 16s trunk passed +1 mvnsite 0m 21s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 0m 34s trunk passed +1 javadoc 0m 16s trunk passed +1 mvninstall 0m 20s the patch passed +1 compile 0m 17s the patch passed +1 javac 0m 17s the patch passed -1 checkstyle 0m 13s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice: patch generated 1 new + 99 unchanged - 1 fixed = 100 total (was 100) +1 mvnsite 0m 22s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 0m 42s the patch passed +1 javadoc 0m 15s the patch passed -1 unit 3m 10s hadoop-yarn-server-applicationhistoryservice in the patch failed. +1 asflicense 0m 18s Patch does not generate ASF License warnings. 22m 47s Reason Tests Failed junit tests hadoop.yarn.server.applicationhistoryservice.TestFileSystemApplicationHistoryStore Subsystem Report/Notes Docker Image:yetus/hadoop:2c91fd8 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12804470/YARN-5100.2.patch JIRA Issue YARN-5100 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux f120d46399e7 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 / 34fddd1 Default Java 1.8.0_91 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-YARN-Build/11503/artifact/patchprocess/diff-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice.txt unit https://builds.apache.org/job/PreCommit-YARN-Build/11503/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice.txt unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/11503/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/11503/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice Console output https://builds.apache.org/job/PreCommit-YARN-Build/11503/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        xgong Xuan Gong added a comment -

        Thanks for the comments, Junping Du

        This would affect YARN_APPLICATION_UPDATED event as well, but I have created a separate jira : https://issues.apache.org/jira/browse/YARN-5101 to check that issue.

        when application state is already in FINISHED state, then we can skip event with STATE_UPDATED_EVENT_TYPE. That sounds more robust. What do you think?

        Yes, let us do it here.

        Show
        xgong Xuan Gong added a comment - Thanks for the comments, Junping Du This would affect YARN_APPLICATION_UPDATED event as well, but I have created a separate jira : https://issues.apache.org/jira/browse/YARN-5101 to check that issue. when application state is already in FINISHED state, then we can skip event with STATE_UPDATED_EVENT_TYPE. That sounds more robust. What do you think? Yes, let us do it here.
        Hide
        djp Junping Du added a comment -

        Thanks Xuan Gong for reporting the issue and deliver the patch to fix it. Comparing with reverse the sequence of events, I would prefer the fix on event handling logic: when application state is already in FINISHED state, then we can skip event with STATE_UPDATED_EVENT_TYPE. That sounds more robust. What do you think?
        BTW, the patch is not apply to trunk. Would you rebase the patch against trunk?

        Show
        djp Junping Du added a comment - Thanks Xuan Gong for reporting the issue and deliver the patch to fix it. Comparing with reverse the sequence of events, I would prefer the fix on event handling logic: when application state is already in FINISHED state, then we can skip event with STATE_UPDATED_EVENT_TYPE. That sounds more robust. What do you think? BTW, the patch is not apply to trunk. Would you rebase the patch against trunk?
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        -1 docker 5m 57s Docker failed to build yetus/hadoop:2c91fd8.



        Subsystem Report/Notes
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12804330/YARN-5100.1.patch
        JIRA Issue YARN-5100
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/11491/console
        Powered by Apache Yetus 0.2.0 http://yetus.apache.org

        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 docker 5m 57s Docker failed to build yetus/hadoop:2c91fd8. Subsystem Report/Notes JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12804330/YARN-5100.1.patch JIRA Issue YARN-5100 Console output https://builds.apache.org/job/PreCommit-YARN-Build/11491/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        xgong Xuan Gong added a comment -

        We should parse the events in reversed order. Applied a fix.

        Show
        xgong Xuan Gong added a comment - We should parse the events in reversed order. Applied a fix.

          People

          • Assignee:
            xgong Xuan Gong
            Reporter:
            xgong Xuan Gong
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development