[
https://issues.apache.org/jira/browse/YARN-7764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16328520#comment-16328520
]
Sunil G commented on YARN-7764:
-------------------------------
[~cheersyang] This is not an issue. Resource#getResources gives back an map of
ResourceInformation. Its been populated and could be used for read-only
purpose. As of now, all caller is adhering to this. If we make an improvement
to do a copy of map while returning from getResources, it impacts a lot to CS
performance.
An option is to keep a copy of map when Resource is created. Its also has a bit
of performance impact. [~leftnoteasy], whats ur thought on this? API in marked
as *InterfaceAudience.Private*, so i think we need not have to keep a duplicate.
> Findbugs warning: Resource#getResources may expose internal representation
> --------------------------------------------------------------------------
>
> Key: YARN-7764
> URL: https://issues.apache.org/jira/browse/YARN-7764
> Project: Hadoop YARN
> Issue Type: Bug
> Components: api
> Affects Versions: 3.0.0, 3.1.0
> Reporter: Weiwei Yang
> Priority: Minor
> Labels: findbugs
>
> Hadoop qbt report:
> {noformat}
> FindBugs :
> module:hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api
> org.apache.hadoop.yarn.api.records.Resource.getResources() may expose
> internal representation by returning Resource.resources At Resource.java:by
> returning Resource.resources At Resource.java:[line 234]
> {noformat}
> Introduced by YARN-7136.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]