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

Sunil G commented on YARN-6610:
-------------------------------

Thanks [~templedf] for the patch. Few comments,
# # In {{DRC#compare}}, below could be avoided
{code}
137           Arrays.sort(lhsShares);
138           Arrays.sort(rhsShares);
{code}
We are now treating resources per is index and the index is fixed. 
# In {{DRC#compare}}, there are chances of IndexOutOfBoundException etc. We 
need to ensure that such cases are handled correctly in compare and result in 
desired behavior. Do you feel RM should fail-fast in such conditions?
# In case when singleType is false, we are now looping two times over resource 
array. first time to calculate and then to compare. May be we could merge the 
same ?

> DominantResourceCalculator.getResourceAsValue() dominant param is no longer 
> appropriate
> ---------------------------------------------------------------------------------------
>
>                 Key: YARN-6610
>                 URL: https://issues.apache.org/jira/browse/YARN-6610
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: YARN-3926
>            Reporter: Daniel Templeton
>            Assignee: Daniel Templeton
>            Priority: Critical
>         Attachments: YARN-6610.001.patch, YARN-6610.YARN-3926.002.patch, 
> YARN-6610.YARN-3926.003.patch, YARN-6610.YARN-3926.004.patch
>
>
> The {{dominant}} param assumes there are only two resources, i.e. true means 
> to compare the dominant, and false means to compare the subordinate.  Now 
> that there are _n_ resources, this parameter no longer makes sense.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to