[ https://issues.apache.org/jira/browse/YARN-771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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