[ 
https://issues.apache.org/jira/browse/YARN-4699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15223423#comment-15223423
 ] 

Sunil G commented on YARN-4699:
-------------------------------

Hi [~leftnoteasy]
Thank you very much for sharing the comments:

I have one doubt here. As per my change in patch, I use below code:
{code}
CSQueueUtils.updateUsedCapacity(resourceCalculator,
                labelManager.getResourceByLabel(nodeLabel, Resources.none()),
                minimumAllocation, queueUsage, queueCapacities, nodeLabel);
{code}

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.

> Scheduler UI and REST o/p is not in sync when -replaceLabelsOnNode is used to 
> change label of a node
> ----------------------------------------------------------------------------------------------------
>
>                 Key: YARN-4699
>                 URL: https://issues.apache.org/jira/browse/YARN-4699
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: capacity scheduler
>    Affects Versions: 2.7.2
>            Reporter: Sunil G
>            Assignee: Sunil G
>            Priority: Critical
>         Attachments: 0001-YARN-4699.patch, 0002-YARN-4699.patch, 
> AfterAppFInish-LabelY-Metrics.png, ForLabelX-AfterSwitch.png, 
> ForLabelY-AfterSwitch.png
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to