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-6789) new api to get all supported resources from RM
Date Thu, 17 Aug 2017 18:15:00 GMT

    [ 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: 
if (map.keyExists(key)) {
  return map.get(key).getSomeFields();
return "defaultValue";

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

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

View raw message