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

Sunil G commented on YARN-7119:
-------------------------------

Thanks [~maniraj...@gmail.com]. Few comments

# In {{parseResourceValue}}, we could avoid {{boolean alphabet}}. Here {{String 
units = resourceValue.substring(i);}}, units will be "" when there are no 
alphabets.
# In {{isMandatoryResourcesAvailable}}, please use full variable names as 
possible. like resource, memoryResourceInformation etc.
# {{Long value = memRI.getValue();}} could use primitive types
# In {{parseCommandAndCreateResource}}, trim the parsed values
# resourceTypesArr -> resourceTypesArray
# Currently from cli, 
{code}
ResourceInformation ri = ResourceInformation.newInstance(resName, 
ResourceUtils.getUnits(resValue), ResourceUtils.getValue(resValue));
{code}
there are two calls to ResourceUtils to get units and value separate. So 
optimization done in ResourceUtils doesnt have impact. I think we could expect 
a String array from ResourceUtils and then use it in caller. Otherwise we have 
to fall into getUnits and getValue as separate logic itself for simplicity.
# In test case {{teardown}}, wrong file is deleted. its not resource-types-4.xml
# In testUpdateNodeResourceTypesWithoutMandatoryResources, could we confirm 
whether resource in memory is updated as MB in server
# Please add some more comments in {{handleRefreshNodes}} to mention which all 
possible combination of resources are handled. This will help to understand 
below segment code faster
{code}
937         } else if( (args.length == 3 && !args[2].contains("=") &&
938             pattern.matcher(args[2]).matches()) ||
939             (args.length == 4 && !args[2].contains("=") &&
940             pattern.matcher(args[2]).matches()) ) {
{code}

> yarn rmadmin -updateNodeResource should be updated for resource types
> ---------------------------------------------------------------------
>
>                 Key: YARN-7119
>                 URL: https://issues.apache.org/jira/browse/YARN-7119
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager, resourcemanager
>    Affects Versions: YARN-3926
>            Reporter: Daniel Templeton
>            Assignee: Manikandan R
>         Attachments: YARN-7119.001.patch, YARN-7119.002.patch, 
> YARN-7119.002.patch
>
>




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

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

Reply via email to