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

Wangda Tan commented on YARN-6789:
----------------------------------

Hi [~templedf], 

Thanks for review, addressed all your comments except:

bq. In ResourceUtils#getDefaultUnit(), the (null == x) idiom is from C and has 
no purpose in Java. Doubly so for (null != x) which doesn't even have a purpose 
in C. 
It gets a value from map by given key, and use the null to check if key exists. 
i'm not sure what did you mean, it is a valid usage to me. This is to avoid 
find key twice: 
{code}
if (map.keyExists(key)) {
  return map.get(key).getSomeFields();
}
return "defaultValue";
{code}

bq. It would be nice to have messages in the asserts in the test classes.
Agree, however it will be too much and failure message should be 
straightforward, I suggest to not add it necessary it frequently fails. 

> new api to get all supported resources from RM
> ----------------------------------------------
>
>                 Key: YARN-6789
>                 URL: https://issues.apache.org/jira/browse/YARN-6789
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager, resourcemanager
>            Reporter: Sunil G
>            Assignee: Sunil G
>         Attachments: YARN-6789-YARN-3926.001.patch, 
> YARN-6789-YARN-3926.002_incomplete_.patch, YARN-6789-YARN-3926.003.patch, 
> YARN-6789-YARN-3926.004.patch
>
>
> It will be better to provide an api to get all supported resource types from 
> RM.



--
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