[ https://issues.apache.org/jira/browse/YARN-9773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16933733#comment-16933733 ]
Eric Payne commented on YARN-9773: ---------------------------------- Thanks [~maniraj...@gmail.com] for the updated patch. Here are a couple of other comments. - All of the private static strings at the beginning of QueueMetrics should be final. - QueueMetrics#registerCustomResources: -- Can code be refactored to call {{this.registry.get(metricPrefix + resourceName)}} only once? - Please add unit tests. -- Perhaps something in {{TestQueueMetricsForCustomResources}}? There may be helper functions available in {{MetricsAsserts}}, or maybe you could sub-class {{QueueMetrics}} from within {{TestQueueMetricsForCustomResources}} to access {{QueueMetrics#registry}} directly. - One minor nit: I would find it more readable if you were to use the full 80 characters, if possible, rather than splitting lines up when it's not necessary. For example: {code:java|title=QueueMetrics#registerCustomResources} + String resourceName = + entry.getKey(); {code} Could be {code:java} + String resourceName = entry.getKey(); {code} Please review the rest of the code for other opportunities to do this. Once these changes are made, I would like to figure out how to backport this to previous branches. I think that includes backporting YARN-8842 and YARN-8750. I will look into this. > Add QueueMetrics for Custom Resources > ------------------------------------- > > Key: YARN-9773 > URL: https://issues.apache.org/jira/browse/YARN-9773 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Manikandan R > Assignee: Manikandan R > Priority: Major > Attachments: YARN-9773.001.patch, YARN-9773.002.patch > > > Although the custom resource metrics are calculated and saved as a > QueueMetricsForCustomResources object within the QueueMetrics class, the JMX > and Simon QueueMetrics do not report that information 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