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

Wangda Tan commented on YARN-2740:
----------------------------------

1. CommonNodeLabelsManager:
1.1) {{@VisibleForTesting}} for isDistributedNodeLabelConfiguration is not 
necessary?

1.2) How to set isDistributedNodeLabelConfiguration:
It's better to add a helper method in YarnConfiguration instead of doing 
following check:
{code}
    isDistributedNodeLabelConfiguration  =
        YarnConfiguration.DISTRIBUTED_NODELABEL_CONFIGURATION_TYPE.equals(conf
            .get(YarnConfiguration.NODELABEL_CONFIGURATION_TYPE,
                YarnConfiguration.DEFAULT_NODELABEL_CONFIGURATION_TYPE));
{code}

I noticed in ResourceTrackerService can leavage the helper method I suggest too:
{code}
    String nodeLabelConfigurationType =
        conf.get(YarnConfiguration.NODELABEL_CONFIGURATION_TYPE,
            YarnConfiguration.DEFAULT_NODELABEL_CONFIGURATION_TYPE);

    isDistributesNodeLabelsConf =
        YarnConfiguration.DISTRIBUTED_NODELABEL_CONFIGURATION_TYPE
            .equals(nodeLabelConfigurationType);
{code}

1.3) Better to add a brief comment about why we don't send message to store

2. FileSystemNodeLabelStore:
Add a note about why ignoreNodeLabelsMapping is needed

3. AdminService:
Should we throw exception when distributedConfiguration enabled for 
removeClusterNodeLabels? remove will change labels on node, after removed, node 
heartbeat with the removed partition will be identified as error, it seems 
reasonable to me. Admin should be able to control "valid-partitions" in the 
cluster.

Same as RMWebServices.

Test looks good to me, but may need to change if you agree with 2/3.

> 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, YARN-2740.20150411-1.patch, 
> YARN-2740.20150411-2.patch, YARN-2740.20150411-3.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
(v6.3.4#6332)

Reply via email to