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

Tarun Parimi commented on YARN-9766:
------------------------------------

Hi [~maniraj...@gmail.com], 
I was testing the scenario yesterday in my cluster to identify the problem and 
also noticed this. Didn't get time to post it. You are right, the null check of 
old is causing the issue.

The old CSQueue will be grouped by only the queueName , which can be non unique 
for ParentQueues.
{code:java}
ParentQueue parentQueue = 
        new ParentQueue(csContext, queueName, parent, oldQueues.get(queueName));
{code}

I think the null check based on old, is itself unnecessary and can be removed 
entirely. This is because the metrics are additionally cached anyway in 
QueueMetrics using the {{queuePath}} which is passed as the {{queueName}} key. 
So this null check here is likely enough.

{code:java}
 QueueMetrics metrics = QueueMetrics.getQueueMetrics().get(queueName);
    if (metrics == null) {
      metrics =
          new CSQueueMetrics(ms, queueName, parent, enableUserMetrics, conf)
              .tag(QUEUE_INFO, queueName);
{code}

I have tested a sample patch simply removing the old null check and it works 
fine. Will post it after verifying additional stuff.



> YARN CapacityScheduler QueueMetrics has missing metrics for parent queues 
> having same name
> ------------------------------------------------------------------------------------------
>
>                 Key: YARN-9766
>                 URL: https://issues.apache.org/jira/browse/YARN-9766
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Tarun Parimi
>            Assignee: Tarun Parimi
>            Priority: Major
>
> In Capacity Scheduler, we enforce Leaf Queues to have unique names. But it is 
> not the case for Parent Queues. For example, we can have the below queue 
> hierarchy, where "b" is the queue name for two different queue paths root.a.b 
> and root.a.d.b . Since it is not a leaf queue this configuration works and 
> apps run fine in the leaf queues 'c'  and 'e'.
>  * root
>  ** a
>  *** b
>  **** c
>  *** d
>  **** b
>  ***** e
> But the jmx metrics does not show the metrics for the parent queue 
> "root.a.d.b" . We can see metrics only for "root.a.b" queue.
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to