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

Bikas Saha commented on YARN-750:
---------------------------------

Dont we need to clear the local cache of the list also? because in 
mergelocaltobuilder() we will be merging setting that onto the builder.
{code}
+  public void setBlacklistRequest(BlacklistRequest blacklistRequest) {
+    maybeInitBuilder();
+    if (this.blacklistRequest == null) {
+      builder.clearBlacklistRequest();
+    }
+    this.blacklistRequest = blacklistRequest;
{code}

First if stmtm is probably redundant code? we just need to check for non-null 
resourceNames before calling .addAll(). Not even that much if the collections 
api handles null.
{code}
+  public void setBlacklistAdditions(List<String> resourceNames) {
+    if (resourceNames == null) {
+      if (this.blacklistAdditions != null) {
+        this.blacklistAdditions.clear();
+      }
+      return;
+    }
+    initBlacklistAdditions();
+    this.blacklistAdditions.clear();
+    this.blacklistAdditions.addAll(resourceNames);
{code}

The javadoc mismatches in the exceptions still seem to be there.

Still sending null instead of blacklist. Did you forget to save the code before 
creating the patch? :P
{code}
-        application.updateResourceRequests(ask);
+        application.updateResourceRequests(ask, null);
{code}
                
> Allow for black-listing resources in CS
> ---------------------------------------
>
>                 Key: YARN-750
>                 URL: https://issues.apache.org/jira/browse/YARN-750
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Arun C Murthy
>            Assignee: Arun C Murthy
>         Attachments: YARN-750.patch, YARN-750.patch
>
>
> YARN-392 and YARN-398 enhance scheduler api to allow for white-lists of 
> resources.
> This jira is a companion to allow for black-listing (in CS).

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

Reply via email to