[ https://issues.apache.org/jira/browse/YARN-10692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17303542#comment-17303542 ]
Peter Bacsko commented on YARN-10692: ------------------------------------- Thanks [~zhuqi] in general this looks good. I just have two nits: 1. {{getNodeGPUUtilization()}} --> rename this to {{getNodeGpuUtilization()}}, the method name looks better this way 2. {{getNodeGPUUtilization()}} you can simplify the addition with streams: {noformat} float totalGpuUtilization = 0; if (gpuList != null && gpuList.size() != 0) { totalGpuUtilization = gpuList .stream() .map(g -> g.getGpuUtilizations().getOverallGpuUtilization()) .collect(Collectors.summingDouble(Float::floatValue)) .floatValue() / gpuList.size(); } return totalGpuUtilization; {noformat} > Add Node GPU Utilization and apply to NodeMetrics. > -------------------------------------------------- > > Key: YARN-10692 > URL: https://issues.apache.org/jira/browse/YARN-10692 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Qi Zhu > Assignee: Qi Zhu > Priority: Major > Attachments: YARN-10692.001.patch, YARN-10692.002.patch > > > Now there are no node level GPU Utilization, this issue will add it, and add > it to NodeMetrics first. > 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