hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Templeton (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (YARN-6789) new api to get all supported resources from RM
Date Thu, 17 Aug 2017 18:21:02 GMT

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

Daniel Templeton edited comment on YARN-6789 at 8/17/17 6:21 PM:
-----------------------------------------------------------------

bq. i'm not sure what did you mean, it is a valid usage to me.

What I mean is {{(null != x)}} versus {{(x != null)}}.  In C the reason to invert the order
is that {{if (x = NULL)}} will compile and can be a hard-to-find bug.  {{if (NULL = x)}} won't
compile, preventing the error.  In Java, {{if (x = null)}} already won't compile, so there's
no reason to invert the args.

Since the asserts are all {{assertEquals()}}, I'm not going to block the patch for assert
messages, but I do really like to have them. :)


was (Author: templedf):
bq. i'm not sure what did you mean, it is a valid usage to me.

What I mean is {{(null != x)}} versus {{(x != null)}}.  In C the reason to invert the order
is that {{if (x = null)}} will compile and can be a hard-to-find bug.  {{if (null = x)}} won't
compile, preventing the error.  In Java, {{if (x = null)}} already won't compile, so there's
no reason to invert the args.

Since the asserts are all {{assertEquals()}}, I'm not going to block the patch for assert
messages, but I do really like to have them. :)

> 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, YARN-6789-YARN-3926.005.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: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message