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

Queue path is recomputed from scratch on every allocation

    Details

    • Hadoop Flags:
      Reviewed

      Description

      As part of the discussion in YARN-6901 I noticed that we are recomputing a queue's path for every allocation. Currently getting the queue's path involves calling getQueuePath on the parent then building onto that string with the basename of the queue. In turn the parent's getQueuePath method does the same, so we end up spending time recomputing a string that will never change until a reconfiguration.

      Ideally the queue path should be computed once during queue initialization rather than on-demand.

      1. YARN-6917.002.patch
        4 kB
        Eric Payne
      2. YARN-6917.001.patch
        4 kB
        Eric Payne

        Issue Links

          Activity

          Hide
          eepayne Eric Payne added a comment -

          The queue path is only ever set during queue initialization or reinitialization. During this time, new queue objects are created and set into a new hierarchy. This patch sets the final queue path during initialization. Queues must be stopped before reconfiguring, and queues can only be made from leaf queues into parent queues and given children. Or, a totally new queue can be added to an existing parent queue.

          I did not include a unit test because this is a performance enhancement and did not change the functionality. There are already many tests calling the getQueuePath() and reinitialize APIs.

          Show
          eepayne Eric Payne added a comment - The queue path is only ever set during queue initialization or reinitialization. During this time, new queue objects are created and set into a new hierarchy. This patch sets the final queue path during initialization. Queues must be stopped before reconfiguring, and queues can only be made from leaf queues into parent queues and given children. Or, a totally new queue can be added to an existing parent queue. I did not include a unit test because this is a performance enhancement and did not change the functionality. There are already many tests calling the getQueuePath() and reinitialize APIs.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 2m 43s Docker mode activated.
                Prechecks
          +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.
                trunk Compile Tests
          +1 mvninstall 13m 53s trunk passed
          +1 compile 0m 34s trunk passed
          +1 checkstyle 0m 26s trunk passed
          +1 mvnsite 0m 36s trunk passed
          +1 findbugs 0m 59s trunk passed
          +1 javadoc 0m 21s trunk passed
                Patch Compile Tests
          +1 mvninstall 0m 34s the patch passed
          +1 compile 0m 34s the patch passed
          +1 javac 0m 34s the patch passed
          -0 checkstyle 0m 24s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager: The patch generated 1 new + 97 unchanged - 0 fixed = 98 total (was 97)
          +1 mvnsite 0m 33s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 12s the patch passed
          +1 javadoc 0m 19s the patch passed
                Other Tests
          +1 unit 43m 34s hadoop-yarn-server-resourcemanager in the patch passed.
          +1 asflicense 0m 14s The patch does not generate ASF License warnings.
          68m 11s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue YARN-6917
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12880723/YARN-6917.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 1f538a0eee8b 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / adb84f3
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          checkstyle https://builds.apache.org/job/PreCommit-YARN-Build/16756/artifact/patchprocess/diff-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/16756/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/16756/console
          Powered by Apache Yetus 0.6.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 2m 43s Docker mode activated.       Prechecks +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.       trunk Compile Tests +1 mvninstall 13m 53s trunk passed +1 compile 0m 34s trunk passed +1 checkstyle 0m 26s trunk passed +1 mvnsite 0m 36s trunk passed +1 findbugs 0m 59s trunk passed +1 javadoc 0m 21s trunk passed       Patch Compile Tests +1 mvninstall 0m 34s the patch passed +1 compile 0m 34s the patch passed +1 javac 0m 34s the patch passed -0 checkstyle 0m 24s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager: The patch generated 1 new + 97 unchanged - 0 fixed = 98 total (was 97) +1 mvnsite 0m 33s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 12s the patch passed +1 javadoc 0m 19s the patch passed       Other Tests +1 unit 43m 34s hadoop-yarn-server-resourcemanager in the patch passed. +1 asflicense 0m 14s The patch does not generate ASF License warnings. 68m 11s Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue YARN-6917 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12880723/YARN-6917.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 1f538a0eee8b 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / adb84f3 Default Java 1.8.0_131 findbugs v3.1.0-RC1 checkstyle https://builds.apache.org/job/PreCommit-YARN-Build/16756/artifact/patchprocess/diff-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/16756/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/16756/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jlowe Jason Lowe added a comment -

          Thanks for the patch, Eric! I agree with the checkstyle nit: the new queuePath field should be private. Other than that I think it looks good. Agree that this is an optimization and the testing should be covered by existing reconfiguration tests.

          Show
          jlowe Jason Lowe added a comment - Thanks for the patch, Eric! I agree with the checkstyle nit: the new queuePath field should be private. Other than that I think it looks good. Agree that this is an optimization and the testing should be covered by existing reconfiguration tests.
          Hide
          eepayne Eric Payne added a comment -

          Thanks Jason Lowe. Uploading patch YARN-6917.002.patch that makes String queuePath private.

          Show
          eepayne Eric Payne added a comment - Thanks Jason Lowe . Uploading patch YARN-6917 .002.patch that makes String queuePath private.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 22s Docker mode activated.
                Prechecks
          +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.
                trunk Compile Tests
          +1 mvninstall 15m 20s trunk passed
          +1 compile 0m 44s trunk passed
          +1 checkstyle 0m 32s trunk passed
          +1 mvnsite 0m 46s trunk passed
          +1 findbugs 1m 18s trunk passed
          +1 javadoc 0m 28s trunk passed
                Patch Compile Tests
          +1 mvninstall 0m 44s the patch passed
          +1 compile 0m 41s the patch passed
          +1 javac 0m 41s the patch passed
          +1 checkstyle 0m 28s the patch passed
          +1 mvnsite 0m 45s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 24s the patch passed
          +1 javadoc 0m 23s the patch passed
                Other Tests
          -1 unit 47m 14s hadoop-yarn-server-resourcemanager in the patch failed.
          +1 asflicense 0m 17s The patch does not generate ASF License warnings.
          72m 45s



          Reason Tests
          Timed out junit tests org.apache.hadoop.yarn.server.resourcemanager.recovery.TestZKRMStateStore
            org.apache.hadoop.yarn.server.resourcemanager.TestSubmitApplicationWithRMHA
            org.apache.hadoop.yarn.server.resourcemanager.TestKillApplicationWithRMHA



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue YARN-6917
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12881798/YARN-6917.002.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 78bc6ecdcd51 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / ce797a1
          Default Java 1.8.0_144
          findbugs v3.1.0-RC1
          unit https://builds.apache.org/job/PreCommit-YARN-Build/16890/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/16890/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/16890/console
          Powered by Apache Yetus 0.6.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 22s Docker mode activated.       Prechecks +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.       trunk Compile Tests +1 mvninstall 15m 20s trunk passed +1 compile 0m 44s trunk passed +1 checkstyle 0m 32s trunk passed +1 mvnsite 0m 46s trunk passed +1 findbugs 1m 18s trunk passed +1 javadoc 0m 28s trunk passed       Patch Compile Tests +1 mvninstall 0m 44s the patch passed +1 compile 0m 41s the patch passed +1 javac 0m 41s the patch passed +1 checkstyle 0m 28s the patch passed +1 mvnsite 0m 45s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 24s the patch passed +1 javadoc 0m 23s the patch passed       Other Tests -1 unit 47m 14s hadoop-yarn-server-resourcemanager in the patch failed. +1 asflicense 0m 17s The patch does not generate ASF License warnings. 72m 45s Reason Tests Timed out junit tests org.apache.hadoop.yarn.server.resourcemanager.recovery.TestZKRMStateStore   org.apache.hadoop.yarn.server.resourcemanager.TestSubmitApplicationWithRMHA   org.apache.hadoop.yarn.server.resourcemanager.TestKillApplicationWithRMHA Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue YARN-6917 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12881798/YARN-6917.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 78bc6ecdcd51 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / ce797a1 Default Java 1.8.0_144 findbugs v3.1.0-RC1 unit https://builds.apache.org/job/PreCommit-YARN-Build/16890/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/16890/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/16890/console Powered by Apache Yetus 0.6.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          jlowe Jason Lowe added a comment -

          The unit test failures are unrelated.

          +1 lgtm. Committing this.

          Show
          jlowe Jason Lowe added a comment - The unit test failures are unrelated. +1 lgtm. Committing this.
          Hide
          jlowe Jason Lowe added a comment -

          Thanks, Eric! I committed this to trunk, branch-2, branch-2.8, and branch-2.8.2.

          Show
          jlowe Jason Lowe added a comment - Thanks, Eric! I committed this to trunk, branch-2, branch-2.8, and branch-2.8.2.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12183 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12183/)
          YARN-6917. Queue path is recomputed from scratch on every allocation. (jlowe: rev 5558792894169425bff054364a1ab4c48b347fb9)

          • (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
          • (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
          • (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #12183 (See https://builds.apache.org/job/Hadoop-trunk-Commit/12183/ ) YARN-6917 . Queue path is recomputed from scratch on every allocation. (jlowe: rev 5558792894169425bff054364a1ab4c48b347fb9) (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java

            People

            • Assignee:
              eepayne Eric Payne
              Reporter:
              jlowe Jason Lowe
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development