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

Jonathan Hung commented on YARN-10012:
--------------------------------------

Thanks [~maniraj...@gmail.com]. A few comments:
 * We should move the additions in QueueMetricsForCustomResources to a separate 
class, perhaps CSQueueMetricsForCustomResources (which inherits from 
QueueMetricsForCustomResources). We'll have to change this bit in the 
QueueMetrics constructor:
{noformat}
if (ResourceUtils.getNumberOfKnownResourceTypes() > 2) {
  this.queueMetricsForCustomResources =
      new QueueMetricsForCustomResources();
  registerCustomResources();
} {noformat}

Perhaps we can just create a {{createQueueMetricsForCustomResources}} method in 
QueueMetrics which returns {{new QueueMetricsForCustomResources();}}, and have 
CSQueueMetrics override this metric to return {{new 
CSQueueMetricsForCustomResources();}}
 * Let's rename QueueMetrics#getQueueMetricsForCustomResource to 
QueueMetrics#getQueueMetricsForCustomResources
 * Should we rename MAXIMUM_CAPACITY_METRIC_PREFIX to MaxCapacity instead of 
MaximumCapacity? To match the existing MaxCapacityMB metric.
 * For the test case: 

{noformat}
RMNode n1 = MockNodes.newNodeInfo(0,
    MockNodes.newResource(50 * GB, 50,
        ImmutableMap.<String, String> builder()
            .put(TestQueueMetricsForCustomResources.CUSTOM_RES_1,
                String.valueOf(10 * GB))
            .build()),
    1, "n1");
RMNode n2 = MockNodes.newNodeInfo(0,
    MockNodes.newResource(50 * GB, 50,
        ImmutableMap.<String, String> builder()
            .put(TestQueueMetricsForCustomResources.CUSTOM_RES_1,
                String.valueOf(20 * GB))
            .build()),
    2, "n2");
{noformat}

> Guaranteed and max capacity queue metrics for custom resources
> --------------------------------------------------------------
>
>                 Key: YARN-10012
>                 URL: https://issues.apache.org/jira/browse/YARN-10012
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Jonathan Hung
>            Assignee: Manikandan R
>            Priority: Major
>         Attachments: YARN-10012.001.patch
>
>
> YARN-9085 adds support for guaranteed/maxcapacity MB/vcores. We should add 
> the same for custom resources.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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