[jira] [Comment Edited] (YARN-10588) Percentage of queue and cluster is zero in WebUI

2021-02-18 Thread Bilwa S T (Jira)


[ 
https://issues.apache.org/jira/browse/YARN-10588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17286446#comment-17286446
 ] 

Bilwa S T edited comment on YARN-10588 at 2/18/21, 12:27 PM:
-

[~Jim_Brennan] [~epayne]

Changing *DominantResourceCalculator#isInvalidDivisor* to 
*DominantResourceCalculator#isAllInvalidDivisor* would solve problem. What do 
you think?
{quote} Currently it returns true if any resource is zero, while {{divide}} is 
only going to return zero if all of the countable ones are zero.
{quote}
 


was (Author: bilwast):
[~Jim_Brennan] [~epayne]

Changing *DominantResourceCalculator#isInvalidDivisor* to ** 
*DominantResourceCalculator#isAllInvalidDivisor* would solve problem. What do 
you think?
{quote} Currently it returns true if any resource is zero, while {{divide}} is 
only going to return zero if all of the countable ones are zero.
{quote}
 

> Percentage of queue and cluster is zero in WebUI 
> -
>
> Key: YARN-10588
> URL: https://issues.apache.org/jira/browse/YARN-10588
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Bilwa S T
>Assignee: Bilwa S T
>Priority: Major
> Attachments: YARN-10588.001.patch, YARN-10588.002.patch, 
> YARN-10588.003.patch
>
>
> Steps to reproduce:
> Configure below property in resource-types.xml
> {code:java}
> 
>  yarn.resource-types
>  yarn.io/gpu
>  {code}
> Submit a job
> In UI you can see % Of Queue and % Of Cluster is zero for the submitted 
> application
>  
> This is because in SchedulerApplicationAttempt has below check for 
> calculating queueUsagePerc and clusterUsagePerc
> {code:java}
> if (!calc.isInvalidDivisor(cluster)) {
> float queueCapacityPerc = queue.getQueueInfo(false, false)
> .getCapacity();
> queueUsagePerc = calc.divide(cluster, usedResourceClone,
> Resources.multiply(cluster, queueCapacityPerc)) * 100;
> if (Float.isNaN(queueUsagePerc) || Float.isInfinite(queueUsagePerc)) {
>   queueUsagePerc = 0.0f;
> }
> clusterUsagePerc =
> calc.divide(cluster, usedResourceClone, cluster) * 100;
>   }
> {code}
> calc.isInvalidDivisor(cluster) always returns true as gpu resource is 0



--
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



[jira] [Comment Edited] (YARN-10588) Percentage of queue and cluster is zero in WebUI

2021-02-18 Thread Bilwa S T (Jira)


[ 
https://issues.apache.org/jira/browse/YARN-10588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17286446#comment-17286446
 ] 

Bilwa S T edited comment on YARN-10588 at 2/18/21, 12:27 PM:
-

[~Jim_Brennan] [~epayne]

Changing *DominantResourceCalculator#isInvalidDivisor* to ** 
*DominantResourceCalculator#isAllInvalidDivisor* would solve problem. What do 
you think?
{quote} Currently it returns true if any resource is zero, while {{divide}} is 
only going to return zero if all of the countable ones are zero.
{quote}
 


was (Author: bilwast):
[~Jim_Brennan] [~epayne]

Changing *DominantResourceCalculator#isInvalidDivisor* to ** 
*DominantResourceCalculator#isAllInvalidDivisor* would ** solve problem. What 
do you think?**
{quote} Currently it returns true if any resource is zero, while {{divide}} is 
only going to return zero if all of the countable ones are zero.
{quote}
 

> Percentage of queue and cluster is zero in WebUI 
> -
>
> Key: YARN-10588
> URL: https://issues.apache.org/jira/browse/YARN-10588
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Bilwa S T
>Assignee: Bilwa S T
>Priority: Major
> Attachments: YARN-10588.001.patch, YARN-10588.002.patch, 
> YARN-10588.003.patch
>
>
> Steps to reproduce:
> Configure below property in resource-types.xml
> {code:java}
> 
>  yarn.resource-types
>  yarn.io/gpu
>  {code}
> Submit a job
> In UI you can see % Of Queue and % Of Cluster is zero for the submitted 
> application
>  
> This is because in SchedulerApplicationAttempt has below check for 
> calculating queueUsagePerc and clusterUsagePerc
> {code:java}
> if (!calc.isInvalidDivisor(cluster)) {
> float queueCapacityPerc = queue.getQueueInfo(false, false)
> .getCapacity();
> queueUsagePerc = calc.divide(cluster, usedResourceClone,
> Resources.multiply(cluster, queueCapacityPerc)) * 100;
> if (Float.isNaN(queueUsagePerc) || Float.isInfinite(queueUsagePerc)) {
>   queueUsagePerc = 0.0f;
> }
> clusterUsagePerc =
> calc.divide(cluster, usedResourceClone, cluster) * 100;
>   }
> {code}
> calc.isInvalidDivisor(cluster) always returns true as gpu resource is 0



--
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



[jira] [Comment Edited] (YARN-10588) Percentage of queue and cluster is zero in WebUI

2021-02-12 Thread Bilwa S T (Jira)


[ 
https://issues.apache.org/jira/browse/YARN-10588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17282988#comment-17282988
 ] 

Bilwa S T edited comment on YARN-10588 at 2/12/21, 8:23 AM:


[~epayne]

Modifying *DominantResourceCalculator#isInvalidDivisor* to match logic of 
*DominantResourceCalculator#divide* is nothing but returning true only if all 
resource value is *0*. We already have a method called 
*DominantResourceCalculator#isAllInvalidDivisor* which will return true only if 
all resources are *zero*. I think we can just change isInvalidDivisor to 
isAllInvalidDivisor.  Correct me if i am wrong


was (Author: bilwast):
[~epayne]

Modifying *DominantResourceCalculator#isInvalidDivisor* to match logic of 
*DominantResourceCalculator#divide* is nothing but returning true only if all 
resource value is *0*. We already have a method called 
*DominantResourceCalculator#isAllInvalidDivisor* which will return true only if 
all resources are *zero*. I think we can just change isInvalidDivisor to 
isAllInvalidDivisor. 

> Percentage of queue and cluster is zero in WebUI 
> -
>
> Key: YARN-10588
> URL: https://issues.apache.org/jira/browse/YARN-10588
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Bilwa S T
>Assignee: Bilwa S T
>Priority: Major
> Attachments: YARN-10588.001.patch, YARN-10588.002.patch, 
> YARN-10588.003.patch
>
>
> Steps to reproduce:
> Configure below property in resource-types.xml
> {code:java}
> 
>  yarn.resource-types
>  yarn.io/gpu
>  {code}
> Submit a job
> In UI you can see % Of Queue and % Of Cluster is zero for the submitted 
> application
>  
> This is because in SchedulerApplicationAttempt has below check for 
> calculating queueUsagePerc and clusterUsagePerc
> {code:java}
> if (!calc.isInvalidDivisor(cluster)) {
> float queueCapacityPerc = queue.getQueueInfo(false, false)
> .getCapacity();
> queueUsagePerc = calc.divide(cluster, usedResourceClone,
> Resources.multiply(cluster, queueCapacityPerc)) * 100;
> if (Float.isNaN(queueUsagePerc) || Float.isInfinite(queueUsagePerc)) {
>   queueUsagePerc = 0.0f;
> }
> clusterUsagePerc =
> calc.divide(cluster, usedResourceClone, cluster) * 100;
>   }
> {code}
> calc.isInvalidDivisor(cluster) always returns true as gpu resource is 0



--
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



[jira] [Comment Edited] (YARN-10588) Percentage of queue and cluster is zero in WebUI

2021-02-10 Thread Bilwa S T (Jira)


[ 
https://issues.apache.org/jira/browse/YARN-10588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17282328#comment-17282328
 ] 

Bilwa S T edited comment on YARN-10588 at 2/10/21, 9:19 AM:


Thanks  [~epayne] [~Jim_Brennan] for taking a look at this issue.
 
I added change in FicaSchedulerApp.java as same issue can occur ie cluster and 
queue resource will not be calculated if one of the resource is zero. I added 
instanceOf check because that method is applicable only for capacityscheduler . 
Many testcases were failing once i removed 
DominantResourceCalculator.isInvalidDivisor() check as testcases had configured 
Fifoscheduler.  


was (Author: bilwast):
Hi [~epayne]

I added change in FicaSchedulerApp.java as same issue can occur ie cluster and 
queue resource will not be calculated if one of the resource is zero. I added 
instanceOf check because that method is applicable only for capacityscheduler . 
Many testcases were failing once i removed 
DominantResourceCalculator.isInvalidDivisor() check as testcases had configured 
Fifoscheduler.  

> Percentage of queue and cluster is zero in WebUI 
> -
>
> Key: YARN-10588
> URL: https://issues.apache.org/jira/browse/YARN-10588
> Project: Hadoop YARN
>  Issue Type: Bug
>Reporter: Bilwa S T
>Assignee: Bilwa S T
>Priority: Major
> Attachments: YARN-10588.001.patch, YARN-10588.002.patch, 
> YARN-10588.003.patch
>
>
> Steps to reproduce:
> Configure below property in resource-types.xml
> {code:java}
> 
>  yarn.resource-types
>  yarn.io/gpu
>  {code}
> Submit a job
> In UI you can see % Of Queue and % Of Cluster is zero for the submitted 
> application
>  
> This is because in SchedulerApplicationAttempt has below check for 
> calculating queueUsagePerc and clusterUsagePerc
> {code:java}
> if (!calc.isInvalidDivisor(cluster)) {
> float queueCapacityPerc = queue.getQueueInfo(false, false)
> .getCapacity();
> queueUsagePerc = calc.divide(cluster, usedResourceClone,
> Resources.multiply(cluster, queueCapacityPerc)) * 100;
> if (Float.isNaN(queueUsagePerc) || Float.isInfinite(queueUsagePerc)) {
>   queueUsagePerc = 0.0f;
> }
> clusterUsagePerc =
> calc.divide(cluster, usedResourceClone, cluster) * 100;
>   }
> {code}
> calc.isInvalidDivisor(cluster) always returns true as gpu resource is 0



--
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