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

Varun Vasudev commented on YARN-4081:
-------------------------------------

The reason I added units was primarily to allow the NMs, the RMs and the user 
to differ in the way they specify units. For example, we have people requesting 
us to specify cpu in milliVCores. Today, this means that all the NMs must 
specify the resources in milliVCores, but there's no way to communicate this an 
admin or a user. Everyone(users + admins) must agree on the units being used.

With the addition of units, we can set the RM to do all its computations in 
milliVCores, let the NMs specify the VCores in same format as today and the 
user can request for resources to be allocated in the unit they prefer. If you 
look at ResoureUtils#getNodeResourceInformation, it actually doesn't read the 
resource-types.xml file, it only reads the node-resources.xml file. Similarly, 
we don't assume that the user has access to the resource-types.xml file being 
used by the RM. They may have drifted apart, it shouldn't matter.

Specifically, for the NMs, what happens behind the scenes is that the 
ClusterNodeTracker when it does the Resources.addTo in addNode, converts the 
NM's resource specified in it's own units to the units that the RM is dealing 
in and the math just flows through.

Does that make sense?

> 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
>             Fix For: YARN-3926
>
>         Attachments: YARN-4081-YARN-3926.001.patch, 
> YARN-4081-YARN-3926.002.patch, YARN-4081-YARN-3926.003.patch, 
> YARN-4081-YARN-3926.004.patch, YARN-4081-YARN-3926.005.patch, 
> YARN-4081-YARN-3926.006.patch, YARN-4081-YARN-3926.007.patch, 
> YARN-4081-YARN-3926.008.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.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to