[
https://issues.apache.org/jira/browse/YARN-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13682126#comment-13682126
]
Niranjan Singh commented on YARN-588:
-------------------------------------
Hi Sandy,
Thanks for the comments , I agree Resources#createResource should be used.So I
have changed all BuilderUtils#newResource to Resources#createResource. But the
problem is that I am getting a compilation error as NodeManager module is first
compiled and then the ResourceManager, as some of the tests in NodeManager
module use BuilderUtils#newResource, when changed to Resources#createResource ,
the module cannot find the resourcemanager package.
Below is just one line of compilation error:
hadoop-common/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/TestContainer.java:[75,61]
error: package org.apache.hadoop.yarn.server.resourcemanager.resource does not
exist
Yeah, I am stuck here, if you do vice-versa , there's no compilation error as
BuilderUtils is available to both the nodemanager and resourcemanager modules.
Any suggestions?
> Two identical utility methods in different classes to build Resource
> --------------------------------------------------------------------
>
> Key: YARN-588
> URL: https://issues.apache.org/jira/browse/YARN-588
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: api
> Affects Versions: 2.0.3-alpha
> Reporter: Sandy Ryza
> Assignee: Niranjan Singh
> Priority: Minor
> Labels: newbie
> Attachments: YARN-588.patch
>
>
> Both Resources and BuilderUtils have a method that takes the same arguments
> to build a Resource object. The code doesn't need both of these methods.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira