[
https://issues.apache.org/jira/browse/YARN-9785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16916544#comment-16916544
]
Bibin A Chundatt commented on YARN-9785:
----------------------------------------
Thank you [~BilwaST] for raising this
Issue looks like API interface level issue DominantResourceCalculator#compare
or wrong usage. *0* should be returned only when all the resources are equal.
But in this case if one resource is greater and other is less the the compare
returns *0*
{code:java}
/**
* Compare two resources - if the value for every resource type for the lhs
* is greater than that of the rhs, return 1. If the value for every resource
* type in the lhs is less than the rhs, return -1. Otherwise, return 0
*
* @param lhs resource to be compared
* @param rhs resource to be compared
* @return 0, 1, or -1
*/
private int compare(Resource lhs, Resource rhs) {
public int compare(Resource clusterResource, Resource lhs, Resource rhs,
boolean singleType) {
{code}
Cluster resource <10,10,0> memory,cpu,gpu
||lhs||rhs||
|<1,0>|<0,1>|returns --> 0|
ResourceCalculator#compare expects *0* only if values are equal.
All the callers that expects all the fields to be
lessthanEqual/greaterThanEqual are affected.
[~rohithsharma]/[~tangzhankun]/[[email protected]]
> Application gets activated even when AM memory has reached
> ----------------------------------------------------------
>
> Key: YARN-9785
> URL: https://issues.apache.org/jira/browse/YARN-9785
> Project: Hadoop YARN
> Issue Type: Bug
> Reporter: Bilwa S T
> Assignee: Bilwa S T
> Priority: Blocker
>
> Configure below property in resource-types.xml
> {quote}<property>
> <name>yarn.resource-types</name>
> <value>yarn.io/gpu</value>
> </property>
> {quote}
> Submit applications even after AM limit for a queue is reached. Applications
> get activated even after limit is reached
> !queue.png!
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]