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

Used queue percentage not accurate in UI for 2.7 and below when using DominantResourceCalculator

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.3
    • Fix Version/s: 2.7.4
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      YARN-4751 adds the getUsedCapacity and getAbsoluteUsedCapacity methods to AbstractCSQueue which is used to display queue usage in UI for branch-2.7 and below. However if there is more than one partition in the cluster, with different dominant resources, then queue usage may not be displayed as expected.

      Contrived example: Default partition has <90GB, 10vcores>, and "test" partition has <10GB, 90vcores>. root queue in default partition uses <30GB, 10vcores>. Here we expect queue usage to be 100 since it is using all vcores in default partition. But the displayed usage will be (30GB/100GB)/(90GB/100GB) = 33%.

      1. dominantRC.png
        229 kB
        Jonathan Hung
      2. YARN-6152-branch-2.7.001.patch
        3 kB
        Jonathan Hung
      3. YARN-6152-branch-2.7.002.patch
        3 kB
        Jonathan Hung

        Issue Links

          Activity

          Hide
          jhung Jonathan Hung added a comment -

          Eric Payne, do you mind taking a look at this patch? Thanks!

          Show
          jhung Jonathan Hung added a comment - Eric Payne , do you mind taking a look at this patch? Thanks!
          Hide
          sunilg Sunil G added a comment -

          Yes. We should use nlm.getResourceByLabel(partition, clusterResource) instead of clusterResource.

          Only one minor nit:
          labeledResources could be named as totalPartitionResource.

          Also thinking out loud, i feel DRC tests are very less in 2.7. We could add few tests for Queue capacity/resource usages, so that such issues could be caught. I think we can have that in another ticket as well if this is urgent.

          Show
          sunilg Sunil G added a comment - Yes. We should use nlm.getResourceByLabel(partition, clusterResource) instead of clusterResource . Only one minor nit: labeledResources could be named as totalPartitionResource . Also thinking out loud, i feel DRC tests are very less in 2.7. We could add few tests for Queue capacity/resource usages, so that such issues could be caught. I think we can have that in another ticket as well if this is urgent.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 11m 49s 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 8m 46s branch-2.7 passed
          +1 compile 0m 34s branch-2.7 passed with JDK v1.8.0_121
          +1 compile 0m 32s branch-2.7 passed with JDK v1.7.0_121
          +1 checkstyle 0m 22s branch-2.7 passed
          +1 mvnsite 0m 40s branch-2.7 passed
          +1 mvneclipse 0m 20s branch-2.7 passed
          +1 findbugs 1m 20s branch-2.7 passed
          +1 javadoc 0m 21s branch-2.7 passed with JDK v1.8.0_121
          +1 javadoc 0m 26s branch-2.7 passed with JDK v1.7.0_121
          +1 mvninstall 0m 31s the patch passed
          +1 compile 0m 29s the patch passed with JDK v1.8.0_121
          +1 javac 0m 29s the patch passed
          +1 compile 0m 30s the patch passed with JDK v1.7.0_121
          +1 javac 0m 30s the patch passed
          +1 checkstyle 0m 19s the patch passed
          +1 mvnsite 0m 38s the patch passed
          +1 mvneclipse 0m 15s the patch passed
          -1 whitespace 0m 0s The patch has 1172 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
          -1 whitespace 0m 34s The patch 70 line(s) with tabs.
          +1 findbugs 1m 28s the patch passed
          +1 javadoc 0m 22s the patch passed with JDK v1.8.0_121
          +1 javadoc 0m 25s the patch passed with JDK v1.7.0_121
          -1 unit 51m 2s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_121.
          +1 asflicense 0m 15s The patch does not generate ASF License warnings.
          136m 7s



          Reason Tests
          JDK v1.8.0_121 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens
            hadoop.yarn.server.resourcemanager.applicationsmanager.TestAMRestart
            hadoop.yarn.server.resourcemanager.TestAMAuthorization
          JDK v1.7.0_121 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens
            hadoop.yarn.server.resourcemanager.TestAMAuthorization



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:c420dfe
          JIRA Issue YARN-6152
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12851265/YARN-6152-branch-2.7.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 9c0c15dae740 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision branch-2.7 / 086ee0a
          Default Java 1.7.0_121
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_121 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_121
          findbugs v3.0.0
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/14835/artifact/patchprocess/whitespace-eol.txt
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/14835/artifact/patchprocess/whitespace-tabs.txt
          unit https://builds.apache.org/job/PreCommit-YARN-Build/14835/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_121.txt
          JDK v1.7.0_121 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14835/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
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/14835/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 11m 49s 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 8m 46s branch-2.7 passed +1 compile 0m 34s branch-2.7 passed with JDK v1.8.0_121 +1 compile 0m 32s branch-2.7 passed with JDK v1.7.0_121 +1 checkstyle 0m 22s branch-2.7 passed +1 mvnsite 0m 40s branch-2.7 passed +1 mvneclipse 0m 20s branch-2.7 passed +1 findbugs 1m 20s branch-2.7 passed +1 javadoc 0m 21s branch-2.7 passed with JDK v1.8.0_121 +1 javadoc 0m 26s branch-2.7 passed with JDK v1.7.0_121 +1 mvninstall 0m 31s the patch passed +1 compile 0m 29s the patch passed with JDK v1.8.0_121 +1 javac 0m 29s the patch passed +1 compile 0m 30s the patch passed with JDK v1.7.0_121 +1 javac 0m 30s the patch passed +1 checkstyle 0m 19s the patch passed +1 mvnsite 0m 38s the patch passed +1 mvneclipse 0m 15s the patch passed -1 whitespace 0m 0s The patch has 1172 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply -1 whitespace 0m 34s The patch 70 line(s) with tabs. +1 findbugs 1m 28s the patch passed +1 javadoc 0m 22s the patch passed with JDK v1.8.0_121 +1 javadoc 0m 25s the patch passed with JDK v1.7.0_121 -1 unit 51m 2s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_121. +1 asflicense 0m 15s The patch does not generate ASF License warnings. 136m 7s Reason Tests JDK v1.8.0_121 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens   hadoop.yarn.server.resourcemanager.applicationsmanager.TestAMRestart   hadoop.yarn.server.resourcemanager.TestAMAuthorization JDK v1.7.0_121 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens   hadoop.yarn.server.resourcemanager.TestAMAuthorization Subsystem Report/Notes Docker Image:yetus/hadoop:c420dfe JIRA Issue YARN-6152 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12851265/YARN-6152-branch-2.7.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 9c0c15dae740 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision branch-2.7 / 086ee0a Default Java 1.7.0_121 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_121 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_121 findbugs v3.0.0 whitespace https://builds.apache.org/job/PreCommit-YARN-Build/14835/artifact/patchprocess/whitespace-eol.txt whitespace https://builds.apache.org/job/PreCommit-YARN-Build/14835/artifact/patchprocess/whitespace-tabs.txt unit https://builds.apache.org/job/PreCommit-YARN-Build/14835/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_121.txt JDK v1.7.0_121 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14835/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 Console output https://builds.apache.org/job/PreCommit-YARN-Build/14835/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jhung Jonathan Hung added a comment -

          Sunil G, thanks for the review. Uploaded 002 patch. Also created YARN-6154 for DRC unit tests.

          Show
          jhung Jonathan Hung added a comment - Sunil G , thanks for the review. Uploaded 002 patch. Also created YARN-6154 for DRC unit tests.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 16s 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 52s branch-2.7 passed
          +1 compile 0m 26s branch-2.7 passed with JDK v1.8.0_121
          +1 compile 0m 28s branch-2.7 passed with JDK v1.7.0_121
          +1 checkstyle 0m 20s branch-2.7 passed
          +1 mvnsite 0m 35s branch-2.7 passed
          +1 mvneclipse 0m 18s branch-2.7 passed
          +1 findbugs 1m 2s branch-2.7 passed
          +1 javadoc 0m 19s branch-2.7 passed with JDK v1.8.0_121
          +1 javadoc 0m 23s branch-2.7 passed with JDK v1.7.0_121
          +1 mvninstall 0m 27s the patch passed
          +1 compile 0m 22s the patch passed with JDK v1.8.0_121
          +1 javac 0m 22s the patch passed
          +1 compile 0m 27s the patch passed with JDK v1.7.0_121
          +1 javac 0m 27s the patch passed
          +1 checkstyle 0m 17s the patch passed
          +1 mvnsite 0m 32s the patch passed
          +1 mvneclipse 0m 13s the patch passed
          -1 whitespace 0m 0s The patch has 1501 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
          -1 whitespace 0m 41s The patch 70 line(s) with tabs.
          +1 findbugs 1m 11s the patch passed
          +1 javadoc 0m 15s the patch passed with JDK v1.8.0_121
          +1 javadoc 0m 21s the patch passed with JDK v1.7.0_121
          -1 unit 51m 57s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_121.
          +1 asflicense 0m 17s The patch does not generate ASF License warnings.
          121m 13s



          Reason Tests
          JDK v1.8.0_121 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens
            hadoop.yarn.server.resourcemanager.TestAMAuthorization
          JDK v1.7.0_121 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens
            hadoop.yarn.server.resourcemanager.TestAMAuthorization



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:c420dfe
          JIRA Issue YARN-6152
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12851295/YARN-6152-branch-2.7.002.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 9bfc456924fc 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision branch-2.7 / 086ee0a
          Default Java 1.7.0_121
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_121 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_121
          findbugs v3.0.0
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/14838/artifact/patchprocess/whitespace-eol.txt
          whitespace https://builds.apache.org/job/PreCommit-YARN-Build/14838/artifact/patchprocess/whitespace-tabs.txt
          unit https://builds.apache.org/job/PreCommit-YARN-Build/14838/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_121.txt
          JDK v1.7.0_121 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14838/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
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/14838/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT 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 16s 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 52s branch-2.7 passed +1 compile 0m 26s branch-2.7 passed with JDK v1.8.0_121 +1 compile 0m 28s branch-2.7 passed with JDK v1.7.0_121 +1 checkstyle 0m 20s branch-2.7 passed +1 mvnsite 0m 35s branch-2.7 passed +1 mvneclipse 0m 18s branch-2.7 passed +1 findbugs 1m 2s branch-2.7 passed +1 javadoc 0m 19s branch-2.7 passed with JDK v1.8.0_121 +1 javadoc 0m 23s branch-2.7 passed with JDK v1.7.0_121 +1 mvninstall 0m 27s the patch passed +1 compile 0m 22s the patch passed with JDK v1.8.0_121 +1 javac 0m 22s the patch passed +1 compile 0m 27s the patch passed with JDK v1.7.0_121 +1 javac 0m 27s the patch passed +1 checkstyle 0m 17s the patch passed +1 mvnsite 0m 32s the patch passed +1 mvneclipse 0m 13s the patch passed -1 whitespace 0m 0s The patch has 1501 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply -1 whitespace 0m 41s The patch 70 line(s) with tabs. +1 findbugs 1m 11s the patch passed +1 javadoc 0m 15s the patch passed with JDK v1.8.0_121 +1 javadoc 0m 21s the patch passed with JDK v1.7.0_121 -1 unit 51m 57s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_121. +1 asflicense 0m 17s The patch does not generate ASF License warnings. 121m 13s Reason Tests JDK v1.8.0_121 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens   hadoop.yarn.server.resourcemanager.TestAMAuthorization JDK v1.7.0_121 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens   hadoop.yarn.server.resourcemanager.TestAMAuthorization Subsystem Report/Notes Docker Image:yetus/hadoop:c420dfe JIRA Issue YARN-6152 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12851295/YARN-6152-branch-2.7.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 9bfc456924fc 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision branch-2.7 / 086ee0a Default Java 1.7.0_121 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_121 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_121 findbugs v3.0.0 whitespace https://builds.apache.org/job/PreCommit-YARN-Build/14838/artifact/patchprocess/whitespace-eol.txt whitespace https://builds.apache.org/job/PreCommit-YARN-Build/14838/artifact/patchprocess/whitespace-tabs.txt unit https://builds.apache.org/job/PreCommit-YARN-Build/14838/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_121.txt JDK v1.7.0_121 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/14838/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 Console output https://builds.apache.org/job/PreCommit-YARN-Build/14838/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          sunilg Sunil G added a comment -

          I am fine with latest patch. Will wait for review from Eric Payne too.

          Show
          sunilg Sunil G added a comment - I am fine with latest patch. Will wait for review from Eric Payne too.
          Hide
          eepayne Eric Payne added a comment -

          Thanks Jonathan Hung, I will review today.

          Show
          eepayne Eric Payne added a comment - Thanks Jonathan Hung , I will review today.
          Hide
          eepayne Eric Payne added a comment -

          The patch LGTM. +1

          The unit test failures are unrelated.

          Show
          eepayne Eric Payne added a comment - The patch LGTM. +1 The unit test failures are unrelated.
          Hide
          eepayne Eric Payne added a comment -

          Thanks for finding and fixing this issue Jonathan Hung. I merged this fix into branch-2.7.

          Show
          eepayne Eric Payne added a comment - Thanks for finding and fixing this issue Jonathan Hung . I merged this fix into branch-2.7.
          Hide
          jhung Jonathan Hung added a comment -

          Great, thanks Eric Payne and Sunil G!

          Show
          jhung Jonathan Hung added a comment - Great, thanks Eric Payne and Sunil G !

            People

            • Assignee:
              jhung Jonathan Hung
              Reporter:
              jhung Jonathan Hung
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development