[
https://issues.apache.org/jira/browse/YARN-6781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128362#comment-16128362
]
Sunil G commented on YARN-6781:
-------------------------------
Sorry. During commit, I tried to compile whole hadoop and found compilation is
broken. In earlier jira, we change ResourceUtils to yarn-api however its test
class was left in hadoop-common itself. I ll raise a ticket to track it
separately.
For now, please help to share a new patch. Error traces are below, you need to
remove the extra argument from {{TestResourceUtils}} as well.
{noformat}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile
(default-testCompile) on project hadoop-yarn-common: Compilation failure:
Compilation failure:
[ERROR]
/Users/sunilgovindan/Work/hadoop/commit/sb_trunk/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/resource/TestResourceUtils.java:[187,20]
method initializeResourcesMap in class
org.apache.hadoop.yarn.util.resource.ResourceUtils cannot be applied to given
types;
[ERROR] required: org.apache.hadoop.conf.Configuration
[ERROR] found:
org.apache.hadoop.conf.Configuration,java.util.Map<java.lang.String,org.apache.hadoop.yarn.api.records.ResourceInformation>
[ERROR] reason: actual and formal argument lists differ in length
[ERROR]
/Users/sunilgovindan/Work/hadoop/commit/sb_trunk/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/resource/TestResourceUtils.java:[253,22]
method initializeResourcesMap in class
org.apache.hadoop.yarn.util.resource.ResourceUtils cannot be applied to given
types;
[ERROR] required: org.apache.hadoop.conf.Configuration
[ERROR] found:
org.apache.hadoop.conf.Configuration,java.util.Map<java.lang.String,org.apache.hadoop.yarn.api.records.ResourceInformation>
[ERROR] reason: actual and formal argument lists differ in length
{noformat}
> ResourceUtils.initializeResourcesMap() takes an unnecessary Map parameter
> -------------------------------------------------------------------------
>
> Key: YARN-6781
> URL: https://issues.apache.org/jira/browse/YARN-6781
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: resourcemanager
> Affects Versions: YARN-3926
> Reporter: Daniel Templeton
> Assignee: Yu-Tang Lin
> Priority: Minor
> Labels: newbie
> Fix For: YARN-3926
>
> Attachments: YARN-6781.001.patch, YARN-6781-YARN-3926.002.patch
>
>
> The {{resourceInformationMap}} parameter is always passed in as a new {{Map}}
> object, and it's never referenced again after the call. The parameter can be
> eliminated. Instead the {{Map}} can be created inside the
> {{initializeResourcesMap()}} method.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]