[
https://issues.apache.org/jira/browse/YARN-6245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15886640#comment-15886640
]
Karthik Kambatla commented on YARN-6245:
----------------------------------------
Barely skimmed through the patch.
What do you think of an approach where ImmutableResource extends Resource but
throws an UnsupportedException on modification? I have not measured it, but the
instantiation might not be as expensive given there is no protobuf. Resource
could have a getImmutableCopy() method that returns a copy. We could play
around with creating this on every get call or only on an update.
> Add FinalResource object to reduce overhead of Resource class instancing
> ------------------------------------------------------------------------
>
> Key: YARN-6245
> URL: https://issues.apache.org/jira/browse/YARN-6245
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Wangda Tan
> Attachments: YARN-6245.preliminary-staled.1.patch
>
>
> There're lots of Resource object creation in YARN Scheduler, since Resource
> object is backed by protobuf, creation of such objects is expensive and
> becomes bottleneck.
> To address the problem, we can introduce a FinalResource (Is it better to
> call it ImmutableResource?) object, which is not backed by PBImpl. We can use
> this object in frequent invoke paths in the scheduler.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]