hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Qiu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (YARN-6195) Export UsedCapacity and AbsoluteUsedCapacity to JMX
Date Mon, 13 Mar 2017 20:45:41 GMT

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

Benson Qiu edited comment on YARN-6195 at 3/13/17 8:45 PM:
-----------------------------------------------------------

[~leftnoteasy], [~sunilg]: Here's the approach I have right now, based on [~jlowe]'s comments.
Would appreciate any thoughts.

{code:title=CSQueueUtils#updateUsedCapacity|borderStyle=solid}
    Set<String> nodeLabels = childQueue.getNodeLabelsForQueue();

    // {some code omitted}

    // QueueMetrics does not support per-label capacities,
    // so we report the maximum across all labels.
    for (String nodeLabel : nodeLabels) {
      usedCapacity =
          Math.max(queueCapacities.getUsedCapacity(nodeLabel), usedCapacity);
      absoluteUsedCapacity =
          Math.max(queueCapacities.getAbsoluteUsedCapacity(nodeLabel),
              absoluteUsedCapacity);
    }
    queueMetrics.setUsedCapacity(usedCapacity);
    queueMetrics.setAbsoluteUsedCapacity(absoluteUsedCapacity);
{code}


was (Author: benson.qiu):
[~leftnoteasy], [~sunilg]]: Here's the approach I have right now, based on [~jlowe]'s comments.
Would appreciate any thoughts.

{code:title=CSQueueUtils#updateUsedCapacity|borderStyle=solid}
    Set<String> nodeLabels = childQueue.getNodeLabelsForQueue();

    // {some code omitted}

    // QueueMetrics does not support per-label capacities,
    // so we report the maximum across all labels.
    for (String nodeLabel : nodeLabels) {
      usedCapacity =
          Math.max(queueCapacities.getUsedCapacity(nodeLabel), usedCapacity);
      absoluteUsedCapacity =
          Math.max(queueCapacities.getAbsoluteUsedCapacity(nodeLabel),
              absoluteUsedCapacity);
    }
    queueMetrics.setUsedCapacity(usedCapacity);
    queueMetrics.setAbsoluteUsedCapacity(absoluteUsedCapacity);
{code}

> Export UsedCapacity and AbsoluteUsedCapacity to JMX
> ---------------------------------------------------
>
>                 Key: YARN-6195
>                 URL: https://issues.apache.org/jira/browse/YARN-6195
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: capacityscheduler, metrics, yarn
>    Affects Versions: 3.0.0-alpha3
>            Reporter: Benson Qiu
>            Assignee: Benson Qiu
>         Attachments: YARN-6195.001.patch, YARN-6195.002.patch
>
>
> `usedCapacity` and `absoluteUsedCapacity` are currently not available as JMX. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message