chenyulin0719 commented on PR #754: URL: https://github.com/apache/yunikorn-core/pull/754#issuecomment-1857255778
> @chenyulin0719 I don't think adding new API is necessary here. https://issues.apache.org/jira/browse/YUNIKORN-2087 had already exposed an API to return the node utilisation for dominant resource type only . We should extend/generalise the same API to cover other resource types too. We can add a new field in the response to differentiate the dominant one from others if needed. However, at the same time, we need to ensure backward compatibility as well. Hi @manirajv06, thanks for the feedback. In YUNIKORN-2087, the new AP(/ws/v1/scheduler/node-utilization) returned domaint resource utilization but only for 'default' partition. That was a workaround. ([comment in core](https://github.com/apache/yunikorn-core/blob/master/pkg/webservice/handlers.go#L354-L357)) Therefore, we have YUNIKORN-2088 to get more resource types in partition level) My original idea for this PR is to modify the existing one to be cluster-wide and introduce a new partition-level API. - /ws/v1/scheduler/node-utilization (change from 'default' to combine all partitions) - /ws/v1/partition/:partition/node-utilization (new) But after rethink about your suggestion, I believe you're correct. Those could be done by a generalized one. We can change the existing api /ws/v1/scheduler/node-utilization to return all the necessary information. **Current**: Return dao.NodesUtilDAOInfo (Domaint Resource only.) **To be**: return all partitions, all type's resources utilization. > [{ > "partition": "default", > "nodeUtilizationList" : []*dao.NodesUtilDAOInfo > }, > { > "partition": "other-partitions", > "nodeUtilizationList" : []*dao.NodesUtilDAOInfo > }] I think we could remove the dominant calculation from yunikorn-core. Craig has suggested an algorithm to calculate the weight of dao.NodesUtilDAOInfo, so we can get domaint resources indirectly in partitions/cluster level. (https://yunikornworkspace.slack.com/archives/CL9CRJ1KM/p1701713212026479?thread_ts=1701680922.070739&cid=CL9CRJ1KM) This change will break backward compatibility in UI. (the current node utilization chart will fail, we need a quick fix) For api, I think the change is acceptible because the existing api was not formal released in 1.4.0 (The document is going to be updated in 1.5.0) Hi @manirajv06 , @wilfred-s , @craigcondit , If I can obtain your approval for my proposal, I will withdraw this pull request and modify the Jira. Thanks for reading. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
