[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-31 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13755478#comment-13755478
 ] 

Hudson commented on YARN-771:
-

SUCCESS: Integrated in Hadoop-Yarn-trunk #318 (See 
[https://builds.apache.org/job/Hadoop-Yarn-trunk/318/])
YARN-771. AMRMClient support for resource blacklisting (Junping Du via bikas) 
(bikas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1519107)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/AMRMClientImpl.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceBlacklistRequestPBImpl.java


 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Fix For: 2.1.1-beta

 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, 
 YARN-771-v3.patch, YARN-771-v4.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-31 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13755506#comment-13755506
 ] 

Hudson commented on YARN-771:
-

FAILURE: Integrated in Hadoop-Hdfs-trunk #1508 (See 
[https://builds.apache.org/job/Hadoop-Hdfs-trunk/1508/])
YARN-771. AMRMClient support for resource blacklisting (Junping Du via bikas) 
(bikas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1519107)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/AMRMClientImpl.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceBlacklistRequestPBImpl.java


 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Fix For: 2.1.1-beta

 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, 
 YARN-771-v3.patch, YARN-771-v4.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-31 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13755528#comment-13755528
 ] 

Hudson commented on YARN-771:
-

FAILURE: Integrated in Hadoop-Mapreduce-trunk #1535 (See 
[https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1535/])
YARN-771. AMRMClient support for resource blacklisting (Junping Du via bikas) 
(bikas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1519107)
* /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/impl/AMRMClientImpl.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClient.java
* 
/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ResourceBlacklistRequestPBImpl.java


 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Fix For: 2.1.1-beta

 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, 
 YARN-771-v3.patch, YARN-771-v4.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-30 Thread Junping Du (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13754441#comment-13754441
 ] 

Junping Du commented on YARN-771:
-

bq. an API should be clear by itself.
That's a good point. Clear is more important here. Will update patch 
accordingly.

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, YARN-771-v3.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-30 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13754494#comment-13754494
 ] 

Hadoop QA commented on YARN-771:


{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12600749/YARN-771-v4.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-YARN-Build/1805//testReport/
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/1805//console

This message is automatically generated.

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, 
 YARN-771-v3.patch, YARN-771-v4.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-30 Thread Junping Du (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13755313#comment-13755313
 ] 

Junping Du commented on YARN-771:
-

Thanks [~bikassaha] for review!

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Fix For: 2.1.1-beta

 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, 
 YARN-771-v3.patch, YARN-771-v4.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-29 Thread Bikas Saha (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13753390#comment-13753390
 ] 

Bikas Saha commented on YARN-771:
-

What if we add node to blacklist and them remove that node from blacklist 
immediately? Wont it end up in both list?
Also, should it be an error to specify the same node in both lists in the same 
method call? In that too, we may end up with the same node in both lists.
{code}
+  @Override
+  public synchronized void updateBlackList(ListString blacklistAdditions,
+  ListString blacklistRemovals) {
+if (blacklistAdditions != null) {
+  this.blacklistAdditions.addAll(blacklistAdditions);
+  // if some nodes are also in blacklistRemovals updated before, we should
+  // remove them here.
+  this.blacklistRemovals.removeAll(blacklistAdditions);
+}
+
+if (blacklistRemovals != null) {
+  // we don't need to handle blacklistAdditions as if same nodes are 
duplicated
+  // in blacklistAdditions, only blacklistRemovals works and nodes will be 
+  // removed from black list.
+  this.blacklistRemovals.addAll(blacklistRemovals);
+}
+  }
{code}

Can we modify TestAMRMClient.testAllocation() to check that on an exception 
during allocate we continue to preserve the previous blacklist and any new 
blacklist additions that were made during the allocate call. The test already 
has support for this. We just need to augment it with blacklist operations.

Minor nit Blacklist reads better than BlackList.


 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, YARN-771-v3.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-29 Thread Junping Du (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13753477#comment-13753477
 ] 

Junping Du commented on YARN-771:
-

[~bikassaha]
b.q. What if we add node to blacklist and them remove that node from blacklist 
immediately? Wont it end up in both list?
Yes. it will appear in both list. However, when going to RM, it will add node 
first and remove it from blacklist set. So node will not be blacklisting.
b.q. Also, should it be an error to specify the same node in both lists in the 
same method call? In that too, we may end up with the same node in both lists.
I may have different idea on this. In general, it is not recommended to put the 
same node on both lists. However, it may not belonging a wrong behaviour. Let's 
say in some cases, application want to put nodes that meet requirement A (set 
A) into blacklist, but don't want to put nodes in requirement B (set B) into 
list. Application can easily to put set A on additional list and set B on 
removal list in the same call without taking care the overlap of A and B. 
Thoughts?
b.q. Can we modify TestAMRMClient.testAllocation() to check that on an 
exception during allocate we continue to preserve the previous blacklist and 
any new blacklist additions that were made during the allocate call. The test 
already has support for this. We just need to augment it with blacklist 
operations.
Sure. Thanks for suggestions here and last readable comments.

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, YARN-771-v3.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-29 Thread Bikas Saha (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13753806#comment-13753806
 ] 

Bikas Saha commented on YARN-771:
-

The RM must handle anything input that the user sends to it. However, as the 
official client, AMRMClient should only send valid input to the RM. IMO, having 
same node in both list at the same invocation of AMRMClient.updateBlacklist() 
should be an error. Something is wrong with the user and results may be 
unexpected. We should detect it and at least log a warning. Adding and removing 
of nodes in different invocations of the method should result in the expected 
behavior == the result of the last invocation. It should not be the case that 
the node ends up in both lists since then the results are indeterminate (in 
this case the RM logic ends up not blacklisting it).

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, YARN-771-v3.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-29 Thread Junping Du (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13754336#comment-13754336
 ] 

Junping Du commented on YARN-771:
-

Hi [~bikassaha], Thanks for good comments above. 
I have different ideas here that I thought every results are determinate so far.
case 1: app add node-a to addition list and then add it to removal list (tends 
to remove it).
{code}
client.updateBlacklist(a, null);
client.updateBlacklist(null, a);
client.schedule();
//{a,a} will be sent, and a will not in blacklist
{code}

case 2: app add node-a to removal list and then add node-a to addition list 
(tends to add node-a back to blacklist)
{code}
client.updateBlacklist(null, a);
client.updateBlacklist(a, null);
client.schedule();
//(a, null) will be sent, so a will be in blacklist
{code}

case 3: app add node-a to removal list and addition list at the same call.
{code}
client.updateBlacklist(a, a);
client.schedule();
//{a, a} will be sent and a will not in blacklist
{code}

I understand there are different opinions around case 3 that it leads to user 
confused to mean I want node-a in blacklist or I want node-a not in 
blacklist. My question is: can this confusion be resolved through proper 
documentation?
Map to real cases, the previous one may come from case which seems rare to me - 
app said I want to remove nodes from blacklist in set R except it is in set A 
(assume node-a in both set A and set R). But the latter one may come from more 
often case - app said I want nodes from set A go to blacklist except it is in 
set R (node-a in both sets). We can better support latter case here rather 
than updateBlacklist twice. Thoughts? 


 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, YARN-771-v3.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-29 Thread Bikas Saha (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13754397#comment-13754397
 ] 

Bikas Saha commented on YARN-771:
-

The cases listed above are possible. However, IMO, an API should be clear by 
itself. It should be clear in a programmatic way.
Secondly, the AMRMClient should make sure its doing the correct thing on its 
own instead of sending something inconsistent/incorrect to the RM and depending 
on RM to fix things. We are fine with the current RM logic but RM internal 
logic may change on its own cycle and break the assumptions made here.

We should always send the last decision of the client to the RM. Consider the 
following case. Say, RM has already been notified about A in blacklist. Now if 
user adds A to blacklist again then removes A from blacklist (case 1 above) 
then users final decision is to remove A. If we resolve this locally and clear 
A from both lists locally then the users last decision will not be sent to the 
RM. Hence RM will continue to have A in its blacklist.

Hence, we should always make sure that the users last decision is honored and 
sent to the RM. The issue arises when user adds and removes the same node in 
the same invocation. We can either choose to 1) throw an 
IllegalArgumentException or 2) log a warning message and send the removal to 
the RM. Sending removal is safe since if the node was already blacklisted on 
the RM then it should be removed. If was not already blacklisted on the RM then 
removing it should be a no-op.

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, YARN-771-v3.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-28 Thread Junping Du (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13752754#comment-13752754
 ] 

Junping Du commented on YARN-771:
-

[~bikassaha], Thanks for review! I address all your comments in v3 patch. 
Please help to look it again. Thx!

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, YARN-771-v3.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-28 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13753055#comment-13753055
 ] 

Hadoop QA commented on YARN-771:


{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12600445/YARN-771-v3.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-YARN-Build/1787//testReport/
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/1787//console

This message is automatically generated.

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch, YARN-771-v3.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-27 Thread Bikas Saha (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13751505#comment-13751505
 ] 

Bikas Saha commented on YARN-771:
-

Thanks for the patch. The overall approach looks good.

Comments on the patch itself.

by adding or removing or with addition and removal
{code}
Update application's black list with adding or removing resources.
{code}

This copying is unnecessary as newInstance does a copy anyways.
{code}
+if (blacklistAdditions != null) {
+  blacklistToAdd = new ArrayListString(blacklistAdditions);
+}
+if (blacklistRemovals != null) {
+  blacklistToRemove = new ArrayListString(blacklistRemovals);
+}
+
+ResourceBlacklistRequest blackListRequest = 
+(blacklistToAdd != null) || (blacklistToRemove != null) ? 
+ResourceBlacklistRequest.newInstance(blacklistToAdd,
+blacklistToRemove) : null;
{code}

Can we please move these to different statements. More readable that way IMO.
{code}
+blacklistAdditions = blacklistRemovals = null;
{code}

blacklistAdditions/Removals may have been updated at this point. So we cannot 
simply override them. We need to append to those collections and also dedupe 
them if necessary. Will help if they were Sets. Also, we could update the 
existing test in tesAMRMClient to verify this behavior. There is an existing 
check for the ask list case.
{code}
+  if (blacklistToAdd != null) {
+blacklistAdditions = new ArrayListString(blacklistToAdd);
+  }
+  if (blacklistToRemove != null) {
+blacklistRemovals = new ArrayListString(blacklistToRemove);
+  }
{code}

Since we will be taking these from the user and then using them later on, does 
it make sense to make a copy of the contents instead of holding onto user 
references?
{code}
+  public synchronized void updateBlackList(ListString blacklistAdditions,
+  ListString blacklistRemovals) {
+this.blacklistAdditions = blacklistAdditions;
+this.blacklistRemovals = blacklistRemovals;
{code}

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-27 Thread Hitesh Shah (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13751522#comment-13751522
 ] 

Hitesh Shah commented on YARN-771:
--

Should a separate jira be filed for fixing headroom/resources available 
information which is being sent from RM to AM? At this point, I believe it does 
not account for whitelisted or blacklisted nodes?

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-27 Thread Bikas Saha (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13751529#comment-13751529
 ] 

Bikas Saha commented on YARN-771:
-

I already did. YARN-774.

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-26 Thread Junping Du (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13750919#comment-13750919
 ] 

Junping Du commented on YARN-771:
-

Can someone give it a review? Thx!

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch, YARN-771-v2.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (YARN-771) AMRMClient support for resource blacklisting

2013-08-25 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13749556#comment-13749556
 ] 

Hadoop QA commented on YARN-771:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12599819/YARN-771-v1.0.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{color:red}-1 findbugs{color}.  The patch appears to introduce 2 new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-YARN-Build/1758//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-YARN-Build/1758//artifact/trunk/patchprocess/newPatchFindbugsWarningshadoop-yarn-client.html
Console output: https://builds.apache.org/job/PreCommit-YARN-Build/1758//console

This message is automatically generated.

 AMRMClient  support for resource blacklisting
 -

 Key: YARN-771
 URL: https://issues.apache.org/jira/browse/YARN-771
 Project: Hadoop YARN
  Issue Type: Sub-task
Reporter: Bikas Saha
Assignee: Junping Du
 Attachments: YARN-771-v1.0.patch


 After YARN-750 AMRMClient should support blacklisting via the new YARN API's

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira