Details
Description
Steps to reproduce:
Configure below property in resource-types.xml
<property> <name>yarn.resource-types</name> <value>yarn.io/gpu</value> </property>
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
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; }
calc.isInvalidDivisor(cluster) always returns true as gpu resource is 0