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

Wangda Tan commented on YARN-6909:
----------------------------------

Thanks [~sunilg], nice numbers :)!

Two comments:

1) All 
{code}
+    int numberOfKnownResourceTypes = ResourceUtils
+        .getNumberOfKnownResourceTypes();
{code} 
Can be pushed down to LightWeightResource constructor. So we don't need the 
extra param.

2) 
Following statements: 
{code}
     resources = new ResourceInformation[NUM_MANDATORY_RESOURCES];
     resources[MEMORY_INDEX] = memoryResInfo;
     resources[VCORES_INDEX] = vcoresResInfo;
{code} 
Can be removed. Since it will be overwritten anyway. We should be able to get 
better performance by removing these statements.

> The performance advantages of YARN-6679 are lost when resource types are used
> -----------------------------------------------------------------------------
>
>                 Key: YARN-6909
>                 URL: https://issues.apache.org/jira/browse/YARN-6909
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: YARN-3926
>            Reporter: Daniel Templeton
>            Assignee: Sunil G
>            Priority: Critical
>         Attachments: YARN-6909.001.patch, YARN-6909.002.patch, 
> YARN-6909.003.patch
>
>
> YARN-6679 added the {{SimpleResource}} as a lightweight replacement for 
> {{ResourcePBImpl}} when a protobuf isn't needed.  With resource types enabled 
> and anything other than memory and CPU defined, {{ResourcePBImpl}} will 
> always be used.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to