hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wangda Tan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-6761) Fix build for YARN-3926 branch
Date Wed, 05 Jul 2017 20:57:00 GMT

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

Wangda Tan commented on YARN-6761:
----------------------------------

Thanks Varun for the patch,

I think we should keep the {{SimpleResource}} to be used for {{#resource-type}} > 2 as
well. Currently what the patch does is initialize a regular Resource object when {{#resource-type}}
> 2.

{code}
    if (tmpResource.getResources().size() > 2) {
      Resource ret = Records.newRecord(Resource.class);
      ret.setMemorySize(memory);
      ret.setVirtualCores(vCores);
      return ret;
    }
    return new SimpleResource(memory, vCores);
{code}

To achieve this, I suggest to remove:
{code}
    private long memory;
    private long vcores;
{code}
>From the SimpleResource, and add a reference to
{code}
    private ResourceInformation memoryResInfo;
    private ResourceInformation vcoresResInfo;
{code}
And initialize a map when create the resource. (Don't do lazy initialization in {{getResources}})

In addition to that, instead of initialize HashMap, I think we can use ImmutableMap for better
memory efficiency, and only create HashMap when 3rd resources added.

> Fix build for YARN-3926 branch
> ------------------------------
>
>                 Key: YARN-6761
>                 URL: https://issues.apache.org/jira/browse/YARN-6761
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager, resourcemanager
>            Reporter: Varun Vasudev
>            Assignee: Varun Vasudev
>         Attachments: YARN-6761-YARN-3926.001.patch
>
>
> After rebasing to trunk, due to the addition of YARN-6679, compilation of the YARN-3926
branch is broken.



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

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


Mime
View raw message