[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Daniel Templeton (JIRA)

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

Daniel Templeton commented on YARN-6789:


Latest patch is fine for me. +1

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



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Wangda Tan (JIRA)

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

Wangda Tan commented on YARN-6789:
--

[~templedf], for your previous comment:

bq. I don't think ClientRMService#getResourceTypeInfo() should require resource 
profiles to be enabled. Why can't the ClientRMService just grab the info from 
ResourceUtils itself?
While working on YARN-7043, I think you're correct, I uploaded patch to 
YARN-7043 which include the change.

Please let me know if you're fine with this patch, otherwise I will commit the 
patch in the next few hours since this blocks following efforts.

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



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Wangda Tan (JIRA)

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

Wangda Tan commented on YARN-6789:
--

Test failures are not related.

YARN-6747/YARN-7044 are tracking failures.

[~templedf], could you comment on the latest patch?

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



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on YARN-6789:
-

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
16s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 6 new or modified test 
files. {color} |
|| || || || {color:brown} YARN-3926 Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
16s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 13m 
47s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 14m  
5s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  2m 
 5s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  3m 
57s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  6m 
13s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  3m 
14s{color} | {color:green} YARN-3926 passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
16s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  3m 
 4s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 10m 
56s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} cc {color} | {color:green} 10m 
56s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 10m 
56s{color} | {color:green} the patch passed {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
2m 20s{color} | {color:orange} root: The patch generated 9 new + 434 unchanged 
- 0 fixed = 443 total (was 434) {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  4m 
32s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  8m  
4s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  3m 
40s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  0m 
41s{color} | {color:green} hadoop-yarn-api in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m 
42s{color} | {color:green} hadoop-yarn-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m 
30s{color} | {color:green} hadoop-yarn-server-common in the patch passed. 
{color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 44m 53s{color} 
| {color:red} hadoop-yarn-server-resourcemanager in the patch failed. {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 20m 29s{color} 
| {color:red} hadoop-yarn-client in the patch failed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m 
11s{color} | {color:green} hadoop-yarn-server-router in the patch passed. 
{color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 98m  
2s{color} | {color:green} hadoop-mapreduce-client-jobclient in the patch 
passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
39s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}270m  6s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | 
hadoop.yarn.server.resourcemanager.scheduler.fair.TestFSAppStarvation |
|   | 
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestContainerAllocation |
|   | hadoop.yarn.client.api.impl.T

[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Daniel Templeton (JIRA)

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

Daniel Templeton commented on YARN-6789:


In the latest patch:
# The new javadocs on the {{newInstance()}} methods all say the same thing.  
The latter two should omit the missing params from the description.
# The comments in the {{hashCode()}} method should be removed.
# Is the {{ResourceProfilesManager}} active even if resource profiles aren't 
enabled?

> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Wangda Tan (JIRA)

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

Wangda Tan commented on YARN-6789:
--

[~templedf], 

Gotcha, thanks, it is just a necessary custom from text book :) I may not 
update patch for the null/x check since it is straightforward and no ambiguous, 
I will change the style next time. 

Beyond the two, is there any other thoughts for the patch, are we good to go if 
Jenkins gave +1?

> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Daniel Templeton (JIRA)

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

Daniel Templeton commented on YARN-6789:


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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Wangda Tan (JIRA)

[ 
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: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Daniel Templeton (JIRA)

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

Daniel Templeton commented on YARN-6789:


My comments:

# The javadocs on the first {{ResourceTypeInfo#newInstance()}} and 
{{ResourceTypeInfo#copy()}} refer to {{ResourceInformation}} instead of 
{{ResourceTypeInfo}}
# Missing the javadoc for the last three {{ResourceTypeInfo#newInstance()}} 
methods
# I'm incredulous that {{ {{ResourceTypeInfo#hashCode()}} is what you intended. 
 Should it maybe be:{code}final int prime = 47;
int result = prime + getName().hashCode();
result = prime * result + getResourceType().hashCode();
return result;{code} 939769357 / 263167 = 3571, which is a number that 
doesn't appear in the code.  There's also no need to choose a large prime.  In 
fact, choosing a prime that's too large will result in overflows.  See 
https://www.sitepoint.com/how-to-implement-javas-hashcode-correctly/ rather 
than that silly SO article.
# 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.
# In {{ResourcePBImpl}}, now that {{initResources()}} in called from both 
constructors, does it still need to be called from the accessors?
# Why the change in {{DominantResourceCalculator}}?
# It would be nice to have messages in the asserts in the test classes.
# I don't think {{ClientRMService#getResourceTypeInfo()}} should require 
resource profiles to be enabled.  Why can't the {{ClientRMService}} just grab 
the info from {{ResourceUtils}} itself?
# Does anyone consume the new variable in {{TestCapacityScheduler}}?

> 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: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on YARN-6789:
-

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  3m 
25s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 4 new or modified test 
files. {color} |
|| || || || {color:brown} YARN-3926 Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
17s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 13m 
20s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 13m 
45s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  1m 
54s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  3m 
49s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  6m  
6s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  3m 
30s{color} | {color:green} YARN-3926 passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
19s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  3m 
 3s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 10m 
18s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} cc {color} | {color:green} 10m 
18s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 10m 
18s{color} | {color:green} the patch passed {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
2m  1s{color} | {color:orange} root: The patch generated 16 new + 211 unchanged 
- 0 fixed = 227 total (was 211) {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  4m 
34s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} whitespace {color} | {color:red}  0m  
0s{color} | {color:red} The patch has 1 line(s) that end in whitespace. Use git 
apply --whitespace=fix <>. Refer https://git-scm.com/docs/git-apply 
{color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  7m 
37s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  3m 
55s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  0m 
42s{color} | {color:green} hadoop-yarn-api in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m 
49s{color} | {color:green} hadoop-yarn-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m 
27s{color} | {color:green} hadoop-yarn-server-common in the patch passed. 
{color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 45m 35s{color} 
| {color:red} hadoop-yarn-server-resourcemanager in the patch failed. {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 20m 49s{color} 
| {color:red} hadoop-yarn-client in the patch failed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  1m 
20s{color} | {color:green} hadoop-yarn-server-router in the patch passed. 
{color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}107m 
22s{color} | {color:green} hadoop-mapreduce-client-jobclient in the patch 
passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
47s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}283m 20s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | 
hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesApps |
|   | 
hadoop.yarn.server.resourcemanager.sch

[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-17 Thread Sunil G (JIRA)

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

Sunil G commented on YARN-6789:
---

v3 patch looks good to me covering unit scenario.
+1 will commit later today.

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-14 Thread Wangda Tan (JIRA)

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

Wangda Tan commented on YARN-6789:
--

bq. I this we need to look for NULL as per me. I could handle this condition in 
this ticket itself if everyone agrees. Thank You.
Agree, +[~vvasudev]/[~templedf], could you share your thoughts here?

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-14 Thread Sunil G (JIRA)

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

Sunil G commented on YARN-6789:
---

Yes. 
bq.Resource object in YARN should be able to get if a unit is empty ("") or 
null, and default unit will be returned with ResourceTypeInfo
I this we need to look for NULL as per me. I could handle this condition in 
this ticket itself if everyone agrees. Thank You.

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-11 Thread Wangda Tan (JIRA)

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

Wangda Tan commented on YARN-6789:
--

[~vvasudev], 

I was wondering if unit is a must-to-have field since unit will significantly 
increase complexity. The example you provided is a good example, I think we 
need it. So we need to get solutions to properly handle rolling upgrade.

There're several upgrade scenarios in my mind:

Case a: Old client/daemon (use old binary without YARN-3926) talk to new YARN 
daemon (use new binary with YARN-3926).
Case b: New client/daemon talk to new YARN daemon, and units inside YARN daemon 
is changed.

For #a, we need to add logic in Resource initialization part, when a unit is 
not set by old client/daemon, server will set a default unit for these 
resources.
For #b, if a unit is set by client/daemon, we will use it. If a unit is not 
set, similar to above, server will set a default unit for these resources.

To support this, Resource object in YARN should be able to get if a unit is 
empty ("") or null, and default unit will be returned with ResourceTypeInfo.

cc: [~sunilg]/[~templedf] for suggestions.

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-11 Thread Varun Vasudev (JIRA)

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

Varun Vasudev commented on YARN-6789:
-

Strongly disagree with not having units. Today if a cluster wants to do 
scheduling in milliVcores, it requires updates to the RM, the NM and breaks 
*every* job that runs on the cluster because every job must be re-configured to 
run in milliVcores. Kubernetes has had support for units from the beginning, I 
don't see why YARN shouldn't have support for units as well.

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-10 Thread Wangda Tan (JIRA)

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

Wangda Tan commented on YARN-6789:
--

[~dan...@cloudera.com],  thanks for sharing your thoughts. Please see my 
response below:

bq. If I understand correctly, what you're proposing is making the units a 
global dictate. The RM says that memory has the unit "Mi", therefore all NMs 
and clients must use that unit. 
This is true, unit of values for different resource types are fixed. To be more 
clear, I propose to remove the "unit" from ResourceInformation object. "Unit" 
for each resource types are unwritten rules which each daemon/clients/am should 
know that. "Unit" can be set for ResourceTypeInformation (by setting 
resource-types.xml), however it is more like documentation instead of affecting 
internal logics.

bq. What happens if an admin changes the units for a resource type? 
This is not allowed in my proposal, I doubt that in what scenario we need to 
change global units. For example, MB as unit for memory works so well today, I 
don't think it make sense to upgrade it to GB/TB since value is a 64 bits 
integer.
This is majorly to avoid dealing with backward compatibility and inconsistency 
between daemons and clients. As I stated above, what if an old client talk to 
RM asks 4096 memory without specifying "MB" as unit? If we make it to be 
globally fixed and unwritten rule, we don't need to worry about inconsistency 
any more. And all rolling upgrade problems are gone for the unit. 

Thoughts?

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-10 Thread Daniel Templeton (JIRA)

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

Daniel Templeton commented on YARN-6789:


Per the recent conversation with [~vvasudev] on YARN-4081, the intent of units 
as they're currently implemented is to allow the node manager to report 
capabilities in units other than what the RM expects and to allow the admin to 
change units for a resource type without forcing all clients to immediately 
updated.

If I understand correctly, what you're proposing is making the units a global 
dictate.  The RM says that memory has the unit "Mi", therefore all NMs and 
clients must use that unit.  That's definitely in line with the way it works in 
trunk.  What happens if an admin changes the units for a resource type?  Does 
that mean she'll also have to simultaneously change the capabilities of all NMs 
and restart the entire cluster?  How would a rolling restart work in that case?

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-09 Thread Wangda Tan (JIRA)

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

Wangda Tan commented on YARN-6789:
--

After a offline discussion with [~sunilg], I think we discovered more issues 
for unit in Resource object. 

The "unit" creates several issues:
- Behavior of the branch is: if unit of a given resource information is not 
set, default unit which configured in resource-type.cfg will be used to 
initialize containers ({{Resource.newInstance}}); and unit will be untouched 
for PB record initialization. ({{ResourcePBImpl(ResourceProto proto)}})
- However, if we have AM runs with old code (which doesn't have YARN-3926 
logics), it will send resource PB record to RM without unit on the wire. So 
YARN RM thinks the coming memory value with empty UNIT (which is B). This is an 
incompatible behavior. 
- Secondly, as I commented above, "unit" inside ResourceTypeInfo is very 
confusing: a. it is not minimum unit. b. it is not default unit, since it won't 
affect "default unit" inside AM, it is just default unit inside RM, which AM 
should not be interested. c. it is not a "suggested/preferred unit", because it 
doesn't make sense as well.
- In addition, It creates performance issue as well since all Resource 
operations need convert to the same unit.

My personal preference is completely removing unit from ResourceInformation. 
And unit of ResourceType means unit of given resource type. For example, 
resource.types.memory.unit = MB. It will be majorly used for UI displaying. 
Units of known resource types including vcores/memory will be hard coded in 
code and cannot changed by setting configuration file, this is majorly for 
backward-compatibility. We can provide unit converter as client library for 
AM/Client to use, Resource-related classes should not directly use it.

Thoughts?

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-08 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on YARN-6789:
-

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
16s{color} | {color:blue} Docker mode activated. {color} |
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 2 new or modified test 
files. {color} |
|| || || || {color:brown} YARN-3926 Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  1m 
25s{color} | {color:blue} Maven dependency ordering for branch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 12m 
26s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 14m  
1s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  1m 
42s{color} | {color:green} YARN-3926 passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  3m  
1s{color} | {color:green} YARN-3926 passed {color} |
| {color:red}-1{color} | {color:red} findbugs {color} | {color:red}  0m 
48s{color} | {color:red} 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager
 in YARN-3926 has 5 extant Findbugs warnings. {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  2m  
8s{color} | {color:green} YARN-3926 passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue}  0m 
18s{color} | {color:blue} Maven dependency ordering for patch {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  2m 
25s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 10m  
2s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} cc {color} | {color:green} 10m  
2s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 10m  
2s{color} | {color:green} the patch passed {color} |
| {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange}  
1m 43s{color} | {color:orange} root: The patch generated 15 new + 202 unchanged 
- 0 fixed = 217 total (was 202) {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  3m 
20s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} whitespace {color} | {color:red}  0m  
1s{color} | {color:red} The patch has 1 line(s) that end in whitespace. Use git 
apply --whitespace=fix <>. Refer https://git-scm.com/docs/git-apply 
{color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  5m 
59s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  2m 
55s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  0m 
36s{color} | {color:green} hadoop-yarn-api in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  2m 
33s{color} | {color:green} hadoop-yarn-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 13m 
21s{color} | {color:green} hadoop-yarn-server-nodemanager in the patch passed. 
{color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 43m 56s{color} 
| {color:red} hadoop-yarn-server-resourcemanager in the patch failed. {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 19m 
59s{color} | {color:green} hadoop-yarn-client in the patch passed. {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red}112m  1s{color} 
| {color:red} hadoop-mapreduce-client-jobclient in the patch failed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
38s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black}282m 59s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | hadoop.yarn.server.resourcemanager.TestRMRestart |
| Timed out junit tests | 
org.apache.hadoop.yarn.server.resourcemanager.TestRMStoreCommands |
|   | org.apache.h

[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-08 Thread Wangda Tan (JIRA)

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

Wangda Tan commented on YARN-6789:
--

Thanks [~sunilg],

One comments regarding to ResourceTypeInfo:
There's a {{getMinimumUnit}} inside ResourceTypeInfo, I'm not quite sure what 
does it mean. For example, if we have minimumUnit=MB specified for memory, it 
is also make sense to specify memory equals to KB/Bytes since we can round the 
value in any case. 

I think we're going to preserve "units" in ResourceInformation object, correct? 
If so, why we need to add unit in the ResourceTypeInfo? For example, if an app 
wants to know quota of resources, the app can get quota with unit from the 
Resource object.

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6789) new api to get all supported resources from RM

2017-08-01 Thread Sunil G (JIRA)

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

Sunil G commented on YARN-6789:
---

cc/ [~leftnoteasy]

> 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
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org