[
https://issues.apache.org/jira/browse/YARN-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16488649#comment-16488649
]
Sunil Govindan commented on YARN-8353:
--------------------------------------
Hi [~LongGang]
We have 2 types of resources. For internal handling in scheduler etc, we are
using a {{LightWeightResource's}} instead of PBImpl object to avoid the
bulkiness and to improve performance. PBImpl is needed only when resource is
talked to outside world. Hence it is different.
Now we can look into {{ContainerUpdateContext}} and ensure both api use same
type objects.
> LightWeightResource's hashCode function is different from parent class
> ----------------------------------------------------------------------
>
> Key: YARN-8353
> URL: https://issues.apache.org/jira/browse/YARN-8353
> Project: Hadoop YARN
> Issue Type: Bug
> Components: RM
> Affects Versions: 3.0.x
> Reporter: LongGang Chen
> Priority: Major
>
> LightWeightResource's hashCode function is different from parent class.
> One of the consequences is:
> ContainerUpdateContext.removeFromOutstandingUpdate will nor work correct,
> ContainerUpdateContext.outstandingIncreases will has smelly datas.
> a simple test:
> {code:java}
> public void testHashCode() throws Exception{
> Resource resource = Resources.createResource(10,10);
> Resource resource1 = new ResourcePBImpl();
> resource1.setMemorySize(10L);
> resource1.setVirtualCores(10);
> int x = resource.hashCode();
> int y = resource1.hashCode();
> Assert.assertEquals(x, y);
> }
> {code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]