[ 
https://issues.apache.org/jira/browse/YARN-5588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Varun Vasudev updated YARN-5588:
--------------------------------
    Attachment: YARN-5588-YARN-3926.004.patch

Thanks for the review [~sunilg].

bq. 1.1) Instead of having a variable named Resource none, we could use 
Resource.NONE itself

The Resources class is part of hadoop-yarn-common but the ProfileCapability 
class if part of hadoop-yarn-api. hadoop-yarn-common depends on hadoop-yarn-api.

bq. 1.2) tmp --> profileName

Fixed.

bq. 2.1) containerResourceProfile="", could we define a static variable as 
EMPTY_PROFILE and could use every where.

I prefer not to do that for now - I suspect we will have to come back to handle 
the empty profile and I'd like to leave that for later.

{quote}
2.2) In {[createProfileCapability}}, need to use containerMemory in below code 
instead of containerVirtualCores

containerMemory = containerMemory == -1 ? DEFAULT_CONTAINER_MEMORY :
                  containerVirtualCores;
{quote}
Good catch. Fixed.

bq. 2.3) May be tmp could be renamed to profileName

Fixed.

bq. 3.1) for (String profile : appProfiles, could we rename profile -> 
appProfile to avoid naming confusion.

Fixed. 

bq. 3.2) In setAMResourceCapability, can amMemory from 
profiles.get(tmp).getMemorySize() could be less than memory and cause Xmx issue.
The way the code works is that we only use profiles.get(tmp).getMemorySize() 
when the command line parameter is not specified. So the scenario you specified 
should not happen.

> Add support for resource profiles in distributed shell
> ------------------------------------------------------
>
>                 Key: YARN-5588
>                 URL: https://issues.apache.org/jira/browse/YARN-5588
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager, resourcemanager
>            Reporter: Varun Vasudev
>            Assignee: Varun Vasudev
>         Attachments: YARN-5588-YARN-3926.001.patch, 
> YARN-5588-YARN-3926.002.patch, YARN-5588-YARN-3926.003.patch, 
> YARN-5588-YARN-3926.004.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to