[
https://issues.apache.org/jira/browse/YUNIKORN-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17100883#comment-17100883
]
Kinga Marton commented on YUNIKORN-93:
--------------------------------------
Thank you [~wilfreds] for the review! Before updating the PR I would like to
discuss/share my opinion on a few possible cases:
* *if {{capacity}} or {{used}} is nil*: instead of playing with +INF, I would
return nil, because we don't have enough data to calculate the percentage, .
Since this is a percentage value, what would be the meaning of +INF here? 100%?
I think the clear solution is to just not calculate it and in the web ui will
be shown as {{'n/a'}}
* *all zeros for {{used}}*: this will result in all zeros for the calculated
capacity as well
* *all zeros for {{capacity}}*: However, this is not a valid case, because the
config validator will [return an error if the total of max capacities =
0|https://github.com/apache/incubator-yunikorn-core/blob/master/pkg/common/configs/configvalidator.go#L99].
we should handle this case as well, so in this case my opinion is that we
should return zero resource.
* *{{capacity}} set to 0, usage is larger than 0*: I this this should not be a
valid case, but I would return zero resource because of the 0 capacity setting
* *no {{capacity}} set, but {{usage}} is set*: if no capacity is set but we
have resource usage I would return an empty resource, because we cannot
calculate the absolute resource usage, since we don’t know what would mean
100%, so the web ui will show n/a (I would not make here an exception for the
case when the usage = 0, however we know that this would mean 0%)
* *overflow case*: {{used}} = maxInt64, {{available}} is 10. Is this a valid
scenario? Do we allow ho have higher usage than the configured max capacity?
Note: above I am using capacity for simplicity, but that is max capacity, since
the abs value calculation is maxValue/usage*100
[~wilfreds], [~wwei] what do you think?
> Queue maximum capacity cleanup
> ------------------------------
>
> Key: YUNIKORN-93
> URL: https://issues.apache.org/jira/browse/YUNIKORN-93
> Project: Apache YuniKorn
> Issue Type: Improvement
> Reporter: Kinga Marton
> Assignee: Kinga Marton
> Priority: Major
> Labels: pull-request-available
> Attachments: queuesResponse.json
>
>
> Right now the absolute used capacity is hardcoded to 20%.
> The usage bar is rendered by this value, but currently, it is hardcoded.
> Note, both capacity/max capacity could be 0.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]