[ 
https://issues.apache.org/jira/browse/YUNIKORN-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17085783#comment-17085783
 ] 

Kinga Marton edited comment on YUNIKORN-93 at 4/17/20, 2:00 PM:
----------------------------------------------------------------

I have started to work on this issue, but I have some concerns/questions. 
Right now we set 0 for capacity/max capacity in case it is not filled as well. 
I think this can cause a lot of misunderstandings. Having max capacity set 
explicitly to 0 means that the capacity is not available. If it is not set, it 
means that is has no limitations. This are two totally different cases, but in 
the UI we represent them in the same way: by showing 0 both for nil and 0 
values.

My suggestion is the following one:
- use "0" just for explicitly set 0 value
- use "N/A" in case no values are defined

This way we can simply show a valid absolute used capacity value as follows:
- "0%" if used capacity = 0
- "N/A" if max capacity is not set: this way max capacity : 0 and and used 
capacity: n will not be a valid scenario anymore, since if the max capacity is 
explicitly set to 0, it cannot have used capacity. If it is not defined, than 
we cannot calculate any absolute used capacity, because we don't know what 
means 100%.
- used capacity/mac capacity*100 in all other cases.

[~wwei], [~adam.antal] what do you think?



was (Author: kmarton):
I have started to work on this issue, but I have some concerns/questions. 
Right now we set 0 for capacity/max capacity in case it is not filled. I think 
this can cause a lot of misunderstandings. Having max capacity set explicitly 
to 0 means that the capacity is not available. If it is not set, it means that 
is has no limitations. This are two totally different cases, but in the UI we 
represent them in the same way: by showing 0 both for nil and 0 values.

My suggestion is the following one:
- use "0" just for explicitly set 0 value
- use "N/A" in case no values are defined

This way we can simply show a valid absolute used capacity value as follows:
- "0%" if used capacity = 0
- "N/A" if max capacity is not set: this way max capacity : 0 and and used 
capacity: n will not be a valid scenario anymore, since if the max capacity is 
explicitly set to 0, it cannot have used capacity. If it is not defined, than 
we cannot calculate any absolute used capacity, because we don't know what 
means 100%.
- used capacity/mac capacity*100 in all other cases.

[~wwei], [~adam.antal] what do you think?


> Provide queue absolute used capacity in rest API
> ------------------------------------------------
>
>                 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: Minor
>
> 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: issues-unsubscr...@yunikorn.apache.org
For additional commands, e-mail: issues-h...@yunikorn.apache.org

Reply via email to