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-4081) Add support for multiple resource types in the Resource class
Date Mon, 31 Aug 2015 16:58:46 GMT

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

Wangda Tan commented on YARN-4081:
----------------------------------

[~vvasudev]:

Some comments/questions so far:

1) Uses String instead of URI for resource key? I think it maybe more efficient to use String,
it will be easier to construct when using it, uses less resource (hasn't tested, but I think
it will be true according to #fields in String and URI). I can understand the motivation of
solving conflicts of resource namespace, but I think namespace conflict is not the major use
case AND String can define namespace as well.

2) Relationship between ResourceInformation and ResourceMapEntry: currently it's 1-1 mapping,
a ResourceInformation has value/unit from ResourceMapEntry, they're kind of overlapping and
also confusing. I think it's better to make ResourceInformation to be one for each resource
type. ResourceMapEntry contains runtime information, and ResourceInformation contains configured
information. This will also avoid create ResourceInformation instance when invoking Resource.getResourceInformation()

3) Resource unit: I like the design which can easily convert a internal value to human-readable
value. But I think maybe we don't need to support define unit in ResourceMapEntry. There're
some cons of it:
- When we doing comparision of resources, we have to convert units, it's an extra overhead.
- It doesn't make a lot of sense to me that keep internal unit of resources: We should handle
it when constructing Resource (something like Resource.newInstance("memory", 12, "GB")). And
we will use the standard unit to do internal computations.
- We can define the standard unit in each "ResourceInformation" if you agree with #2.

4) Do you think it's better to have a global ResourceInformation map instead of storing it
in each Resource instance?

5) Resource#compareTo/hashCode has debug logging.

6) It seems not necessary to instance ArrayList in Resource#compareTo. Just traverse the set
can avoid create the temporary ArrayList.

> Add support for multiple resource types in the Resource class
> -------------------------------------------------------------
>
>                 Key: YARN-4081
>                 URL: https://issues.apache.org/jira/browse/YARN-4081
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Varun Vasudev
>            Assignee: Varun Vasudev
>         Attachments: YARN-4081-YARN-3926.001.patch, YARN-4081-YARN-3926.002.patch
>
>
> For adding support for multiple resource types, we need to add support for this in the
Resource class.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message