[ https://issues.apache.org/jira/browse/YARN-10688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17301987#comment-17301987 ]
Eric Badger commented on YARN-10688: ------------------------------------ [~zhuqi], thanks for the updated patch. To make things a little cleaner, I think we can do something like this instead of having 2 separate methods. {noformat} public long getCapabilityGPUs() { if (capabilityGPUs == null) { return 0; } return capabilityGPUs.value(); } {noformat} This works in my non-GPU environment. I think it's cleaner, but need you to test it out in your GPU environment to make sure it works ok. And then of course update the unit tests to use {{getCapabilitiyGPUs}}. > ClusterMetrics should support GPU capacity related metrics. > ----------------------------------------------------------- > > Key: YARN-10688 > URL: https://issues.apache.org/jira/browse/YARN-10688 > Project: Hadoop YARN > Issue Type: Improvement > Components: metrics, resourcemanager > Affects Versions: 3.2.2, 3.4.0 > Reporter: Qi Zhu > Assignee: Qi Zhu > Priority: Major > Attachments: YARN-10688.001.patch, YARN-10688.002.patch, > image-2021-03-11-15-35-49-625.png > > > Now the ClusterMetrics only support memory and Vcore related metrics. > > {code:java} > @Metric("Memory Utilization") MutableGaugeLong utilizedMB; > @Metric("Vcore Utilization") MutableGaugeLong utilizedVirtualCores; > @Metric("Memory Capability") MutableGaugeLong capabilityMB; > @Metric("Vcore Capability") MutableGaugeLong capabilityVirtualCores; > {code} > > > !image-2021-03-11-15-35-49-625.png|width=593,height=253! > In our cluster, we added GPU supported, so i think the GPU related metrics > should also be supported by ClusterMetrics. > > cc [~pbacsko] [~Jim_Brennan] [~ebadger] [~gandras] > -- 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