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

Scheduler UI and REST o/p is not in sync when -replaceLabelsOnNode is used to change label of a node

    Details

    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Scenario is as follows:
      a. 2 nodes are available in the cluster (node1 with label "x", node2 with label "y")
      b. Submit an application to node1 for label "x".
      c. Change node1 label to "y" by using replaceLabelsOnNode command.
      d. Verify Scheduler UI for metrics such as "Used Capacity", "Absolute Capacity" etc. "x" still shows some capacity.
      e. Change node1 label back to "x" and verify UI and REST o/p

      Output:
      1. "Used Capacity", "Absolute Capacity" etc are not decremented once labels is changed for a node.
      2. UI tab for respective label shows wrong GREEN color in these cases.
      3. REST o/p is wrong for each label after executing above scenario.

      Attaching screen shots also. This ticket will try to cover UI and REST o/p fix when label is changed runtime.

      1. 0001-YARN-4699.patch
        3 kB
        Sunil G
      2. 0002-YARN-4699.patch
        9 kB
        Sunil G
      3. AfterAppFInish-LabelY-Metrics.png
        100 kB
        Sunil G
      4. ForLabelX-AfterSwitch.png
        103 kB
        Sunil G
      5. ForLabelY-AfterSwitch.png
        104 kB
        Sunil G

        Activity

        Hide
        sunilg Sunil G added a comment -

        As I see it, if we can update usedCapacity of the label while changing label on a node, this issue can be fixed. Tested various cases mentioned in the patch, and with this fix, it comes up correctly.

        Attaching this patch for an initial review. Wangda Tan thoughts?

        Show
        sunilg Sunil G added a comment - As I see it, if we can update usedCapacity of the label while changing label on a node, this issue can be fixed. Tested various cases mentioned in the patch, and with this fix, it comes up correctly. Attaching this patch for an initial review. Wangda Tan thoughts?
        Hide
        sunilg Sunil G added a comment -

        HI Wangda Tan
        This patch solves all issues related to capacity when we do -replaceLabelsOnNode on running and used NodeManager. We had to update capacity also which was missing.

        Could pls share your thoughts.

        Show
        sunilg Sunil G added a comment - HI Wangda Tan This patch solves all issues related to capacity when we do -replaceLabelsOnNode on running and used NodeManager. We had to update capacity also which was missing. Could pls share your thoughts.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 8s 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 6m 42s trunk passed
        +1 compile 0m 26s trunk passed with JDK v1.8.0_74
        +1 compile 0m 29s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 18s trunk passed
        +1 mvnsite 0m 34s trunk passed
        +1 mvneclipse 0m 15s trunk passed
        +1 findbugs 1m 5s trunk passed
        +1 javadoc 0m 22s trunk passed with JDK v1.8.0_74
        +1 javadoc 0m 26s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 29s the patch passed
        +1 compile 0m 26s the patch passed with JDK v1.8.0_74
        +1 javac 0m 26s the patch passed
        +1 compile 0m 27s the patch passed with JDK v1.7.0_95
        +1 javac 0m 27s the patch passed
        +1 checkstyle 0m 15s the patch passed
        +1 mvnsite 0m 32s the patch passed
        +1 mvneclipse 0m 13s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 16s the patch passed
        +1 javadoc 0m 19s the patch passed with JDK v1.8.0_74
        +1 javadoc 0m 24s the patch passed with JDK v1.7.0_95
        -1 unit 68m 3s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.8.0_74.
        -1 unit 68m 53s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_95.
        +1 asflicense 0m 18s Patch does not generate ASF License warnings.
        153m 21s



        Reason Tests
        JDK v1.8.0_74 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens
          hadoop.yarn.server.resourcemanager.TestAMAuthorization
        JDK v1.7.0_95 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/12789619/0001-YARN-4699.patch
        JIRA Issue YARN-4699
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux f4ec3d622dba 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 / dc951e6
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-YARN-Build/10807/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_74.txt
        unit https://builds.apache.org/job/PreCommit-YARN-Build/10807/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_95.txt
        unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/10807/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-YARN-Build/10807/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_95.txt
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/10807/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/10807/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 8s 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 6m 42s trunk passed +1 compile 0m 26s trunk passed with JDK v1.8.0_74 +1 compile 0m 29s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 18s trunk passed +1 mvnsite 0m 34s trunk passed +1 mvneclipse 0m 15s trunk passed +1 findbugs 1m 5s trunk passed +1 javadoc 0m 22s trunk passed with JDK v1.8.0_74 +1 javadoc 0m 26s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 29s the patch passed +1 compile 0m 26s the patch passed with JDK v1.8.0_74 +1 javac 0m 26s the patch passed +1 compile 0m 27s the patch passed with JDK v1.7.0_95 +1 javac 0m 27s the patch passed +1 checkstyle 0m 15s the patch passed +1 mvnsite 0m 32s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 16s the patch passed +1 javadoc 0m 19s the patch passed with JDK v1.8.0_74 +1 javadoc 0m 24s the patch passed with JDK v1.7.0_95 -1 unit 68m 3s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.8.0_74. -1 unit 68m 53s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 18s Patch does not generate ASF License warnings. 153m 21s Reason Tests JDK v1.8.0_74 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens   hadoop.yarn.server.resourcemanager.TestAMAuthorization JDK v1.7.0_95 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/12789619/0001-YARN-4699.patch JIRA Issue YARN-4699 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux f4ec3d622dba 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 / dc951e6 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-YARN-Build/10807/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_74.txt unit https://builds.apache.org/job/PreCommit-YARN-Build/10807/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/10807/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-YARN-Build/10807/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/10807/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/10807/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        sunilg Sunil G added a comment -

        Attaching new patch with test case. I had to add a sleep because event processing was delayed. I will also see whether i can have a better wait mechanism.

        Show
        sunilg Sunil G added a comment - Attaching new patch with test case. I had to add a sleep because event processing was delayed. I will also see whether i can have a better wait mechanism.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 20s 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 6m 41s trunk passed
        +1 compile 0m 28s trunk passed with JDK v1.8.0_74
        +1 compile 0m 29s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 17s trunk passed
        +1 mvnsite 0m 33s trunk passed
        +1 mvneclipse 0m 15s trunk passed
        +1 findbugs 1m 6s trunk passed
        +1 javadoc 0m 21s trunk passed with JDK v1.8.0_74
        +1 javadoc 0m 27s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 30s the patch passed
        +1 compile 0m 25s the patch passed with JDK v1.8.0_74
        +1 javac 0m 25s the patch passed
        +1 compile 0m 27s the patch passed with JDK v1.7.0_95
        +1 javac 0m 27s the patch passed
        +1 checkstyle 0m 15s the patch passed
        +1 mvnsite 0m 32s the patch passed
        +1 mvneclipse 0m 13s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 15s the patch passed
        +1 javadoc 0m 19s the patch passed with JDK v1.8.0_74
        +1 javadoc 0m 24s the patch passed with JDK v1.7.0_95
        -1 unit 86m 49s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.8.0_74.
        -1 unit 73m 58s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_95.
        +1 asflicense 0m 17s Patch does not generate ASF License warnings.
        177m 21s



        Reason Tests
        JDK v1.8.0_74 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens
          hadoop.yarn.server.resourcemanager.TestAMAuthorization
        JDK v1.8.0_74 Timed out junit tests org.apache.hadoop.yarn.server.resourcemanager.TestRMHA
        JDK v1.7.0_95 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens
          hadoop.yarn.server.resourcemanager.TestAMAuthorization



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:fbe3e86
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12794426/0002-YARN-4699.patch
        JIRA Issue YARN-4699
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux f9d3a120cfec 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 / 7fae4c6
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-YARN-Build/10827/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_74.txt
        unit https://builds.apache.org/job/PreCommit-YARN-Build/10827/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_95.txt
        unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/10827/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-YARN-Build/10827/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_95.txt
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/10827/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/10827/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 20s 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 6m 41s trunk passed +1 compile 0m 28s trunk passed with JDK v1.8.0_74 +1 compile 0m 29s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 17s trunk passed +1 mvnsite 0m 33s trunk passed +1 mvneclipse 0m 15s trunk passed +1 findbugs 1m 6s trunk passed +1 javadoc 0m 21s trunk passed with JDK v1.8.0_74 +1 javadoc 0m 27s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 30s the patch passed +1 compile 0m 25s the patch passed with JDK v1.8.0_74 +1 javac 0m 25s the patch passed +1 compile 0m 27s the patch passed with JDK v1.7.0_95 +1 javac 0m 27s the patch passed +1 checkstyle 0m 15s the patch passed +1 mvnsite 0m 32s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 15s the patch passed +1 javadoc 0m 19s the patch passed with JDK v1.8.0_74 +1 javadoc 0m 24s the patch passed with JDK v1.7.0_95 -1 unit 86m 49s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.8.0_74. -1 unit 73m 58s hadoop-yarn-server-resourcemanager in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 17s Patch does not generate ASF License warnings. 177m 21s Reason Tests JDK v1.8.0_74 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens   hadoop.yarn.server.resourcemanager.TestAMAuthorization JDK v1.8.0_74 Timed out junit tests org.apache.hadoop.yarn.server.resourcemanager.TestRMHA JDK v1.7.0_95 Failed junit tests hadoop.yarn.server.resourcemanager.TestClientRMTokens   hadoop.yarn.server.resourcemanager.TestAMAuthorization Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12794426/0002-YARN-4699.patch JIRA Issue YARN-4699 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux f9d3a120cfec 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 / 7fae4c6 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-YARN-Build/10827/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_74.txt unit https://builds.apache.org/job/PreCommit-YARN-Build/10827/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/10827/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-YARN-Build/10827/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/10827/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/10827/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        sunilg Sunil G added a comment -

        TestRMHA is passing locally.
        I added some sleep in b/w for existing test case since resource updation to label was slower. Wangda Tan thoughts?

        Show
        sunilg Sunil G added a comment - TestRMHA is passing locally. I added some sleep in b/w for existing test case since resource updation to label was slower. Wangda Tan thoughts?
        Hide
        leftnoteasy Wangda Tan added a comment -

        Sunil G,

        Thanks for working on this, fix looks good to me. I think following code in test may not needed:

        mgr.replaceLabelsOnNode(ImmutableMap.of(nm1.getNodeId(), toSet("z")));

        IIRC, if we do:

        cs.handle(new NodeLabelsUpdateSchedulerEvent(ImmutableMap.of(nm1.getNodeId(), ..

        Labels-related resources should be updated synchronously.

        Show
        leftnoteasy Wangda Tan added a comment - Sunil G , Thanks for working on this, fix looks good to me. I think following code in test may not needed: mgr.replaceLabelsOnNode(ImmutableMap.of(nm1.getNodeId(), toSet("z"))); IIRC, if we do: cs.handle(new NodeLabelsUpdateSchedulerEvent(ImmutableMap.of(nm1.getNodeId(), .. Labels-related resources should be updated synchronously.
        Hide
        sunilg Sunil G added a comment -

        Hi Wangda Tan
        Thank you very much for sharing the comments:

        I have one doubt here. As per my change in patch, I use below code:

        CSQueueUtils.updateUsedCapacity(resourceCalculator,
        	        labelManager.getResourceByLabel(nodeLabel, Resources.none()),
        	        minimumAllocation, queueUsage, queueCapacities, nodeLabel);
        

        And here I invoke {{ labelManager.getResourceByLabel(nodeLabel, Resources.none()}}. label resource in NodeLabelManager will get updated only in CommonNodeLabelsManager and its happening via replaceLabelsOnNode. Yes, all scheduler metrics will work via the event NodeLabelsUpdateSchedulerEvent you mentioned. But If I am not invoking replaceLabelsOnNode, getResourceByLabel will return me empty resource. Could you pls help to suggest if I am missing something here. Thank You.

        Show
        sunilg Sunil G added a comment - Hi Wangda Tan Thank you very much for sharing the comments: I have one doubt here. As per my change in patch, I use below code: CSQueueUtils.updateUsedCapacity(resourceCalculator, labelManager.getResourceByLabel(nodeLabel, Resources.none()), minimumAllocation, queueUsage, queueCapacities, nodeLabel); And here I invoke {{ labelManager.getResourceByLabel(nodeLabel, Resources.none()}}. label resource in NodeLabelManager will get updated only in CommonNodeLabelsManager and its happening via replaceLabelsOnNode . Yes, all scheduler metrics will work via the event NodeLabelsUpdateSchedulerEvent you mentioned. But If I am not invoking replaceLabelsOnNode , getResourceByLabel will return me empty resource. Could you pls help to suggest if I am missing something here. Thank You.
        Hide
        leftnoteasy Wangda Tan added a comment -

        Sunil G,

        Yes you're correct, we should call replaceLabelsOnNode. However, I think we don't have to call both of cs.handle(... NodeLabelsUpdateSchedulerEvent...) and replaceLabelsOnNode.

        Instead, I would suggest to call replaceLabelsOnNode, and monitoring SchedulerNode.getNodePartition get updated.

        Thoughts?

        Show
        leftnoteasy Wangda Tan added a comment - Sunil G , Yes you're correct, we should call replaceLabelsOnNode. However, I think we don't have to call both of cs.handle(... NodeLabelsUpdateSchedulerEvent...) and replaceLabelsOnNode. Instead, I would suggest to call replaceLabelsOnNode, and monitoring SchedulerNode.getNodePartition get updated. Thoughts?
        Hide
        sunilg Sunil G added a comment -

        Thank you Wangda Tan for the comments. I have one more doubt here. Since we use NullNodeLabelManager for tests, dispatcher is going null. So the event to RM will never be sent. Otherwise I need to create another Manager class which implements dispatcher too. Thoughts?

        Show
        sunilg Sunil G added a comment - Thank you Wangda Tan for the comments. I have one more doubt here. Since we use NullNodeLabelManager for tests, dispatcher is going null. So the event to RM will never be sent. Otherwise I need to create another Manager class which implements dispatcher too. Thoughts?
        Hide
        leftnoteasy Wangda Tan added a comment -

        Otherwise I need to create another Manager class which implements dispatcher too. Thoughts?

        I think your latest patch is the best solution. +1 to latest patch, thanks.

        Show
        leftnoteasy Wangda Tan added a comment - Otherwise I need to create another Manager class which implements dispatcher too. Thoughts? I think your latest patch is the best solution. +1 to latest patch, thanks.
        Hide
        leftnoteasy Wangda Tan added a comment -

        Committed to trunk/branch-2/2.8

        Thanks Sunil G.

        Show
        leftnoteasy Wangda Tan added a comment - Committed to trunk/branch-2/2.8 Thanks Sunil G .
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #9565 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9565/)
        YARN-4699. Scheduler UI and REST o/p is not in sync when (wangda: rev 21eb4284487d6f8e4beedb8a0c3168e952f224fc)

        • 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
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueueUtils.java
        • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerNodeLabelUpdate.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9565 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9565/ ) YARN-4699 . Scheduler UI and REST o/p is not in sync when (wangda: rev 21eb4284487d6f8e4beedb8a0c3168e952f224fc) 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 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueueUtils.java hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerNodeLabelUpdate.java
        Hide
        sunilg Sunil G added a comment -

        Thank you very much Wangda Tan for the review and commit...

        Show
        sunilg Sunil G added a comment - Thank you very much Wangda Tan for the review and commit...

          People

          • Assignee:
            sunilg Sunil G
            Reporter:
            sunilg Sunil G
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development