Naganarasimha G R commented on YARN-2740:

Thanks for the review [~wangda],

 bq. Beyond "CommonNodeLabelsManager shouldn't persist labels on nodes when NM 
do heartbeat.", it shouldn't recover labels on nodes when RM restart. This is 
because RM configured centralized config, add some labels to nodes and change 
config to distributed then restart.
Good catch !.  This i can achieve in couple of ways 
* Modify {{NodeLabelsStore.recover()}} to accept a boolean parameter like 
{{boolean skipNodeToLabelsMappings}} and leave the responsibility to the store 
(FileSystemNodeLabelsStore need to take care of skipping)
* Add a method in CommonNodeLabelsManager like {{recoverLabelsOnNode}} and let 
the store use this instead of {{replaceLabelsOnNode}} and we can handle the 
skipping in the new method i.e. 
{{CommonNodeLabelsManager.recoverLabelsOnNode}}. If needed to further ensure 
that NodeLabelsStore do not call replaceLabelsOnNode we can extract a interface 
for the methods used by the  NodeLabelsStore and make CommonNodeLabelsManager 
implement it.

Please provide your opinion on the suggested approaches and also if you have 
any other alternatives in mind.

2nd point will handle in the next patch

> ResourceManager side should properly handle node label modifications when 
> distributed node label configuration enabled
> ----------------------------------------------------------------------------------------------------------------------
>                 Key: YARN-2740
>                 URL: https://issues.apache.org/jira/browse/YARN-2740
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Wangda Tan
>            Assignee: Naganarasimha G R
>             Fix For: 2.8.0
>         Attachments: YARN-2740-20141024-1.patch, YARN-2740.20150320-1.patch, 
> YARN-2740.20150327-1.patch
> According to YARN-2495, when distributed node label configuration is enabled:
> - RMAdmin / REST API should reject change labels on node operations.
> - CommonNodeLabelsManager shouldn't persist labels on nodes when NM do 
> heartbeat.

This message was sent by Atlassian JIRA

Reply via email to