Vinod Kumar Vavilapalli commented on YARN-2494:

This is very close. Final set of comments:
 - The pattern {quote}^[0-9a-zA-Z][0-9a-zA-z-_]* : 
^[0-9a-zA-Z][0-9a-zA-z-_]*{quote} has a bug: small z instead of big Z
 - LabelType, HostType, QueueType, NodeType -> Drop the Type suffix
 - Move QueueType into DynamicNodeLabelsManager.
 - DynamicNodeLabelManager 
    -- updateRunningNodes: No need to call getNMInNodeSet twice
    -- updateRunningNodes -> updatingResourceMappings
    -- QueueType.labels -> accessibleLabels
    -- Move acls also into the RMNodeLabelsManager
 - NodeLabelsManager -> CommonNodeLabelsManager
 - DynamicNodeLabelManager -> RMNodeLabelManager. Similarly 
 - Let’s rename events like AddToClusterNodeLabelsEvent and store operations 
similar to RMStateStore. For e.g. storeNewClusterNodeLables

      // if here, nm is still null, the only reason is, registered nodeId has
      // port = 0. This will only happen in unit test. Some tests registered NM
      // with port = 0. Just print a log and skip following step
      if (null == nm) {
        LOG.warn("Register nodeId is illegal, nodeId=" + nodeId.toString());
That doesn't make sense. Any activated node will have a non-zero port.

> [YARN-796] Node label manager API and storage implementations
> -------------------------------------------------------------
>                 Key: YARN-2494
>                 URL: https://issues.apache.org/jira/browse/YARN-2494
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Wangda Tan
>            Assignee: Wangda Tan
>         Attachments: YARN-2494.patch, YARN-2494.patch, YARN-2494.patch, 
> YARN-2494.patch, YARN-2494.patch, YARN-2494.patch, YARN-2494.patch, 
> YARN-2494.patch
> This JIRA includes APIs and storage implementations of node label manager,
> NodeLabelManager is an abstract class used to manage labels of nodes in the 
> cluster, it has APIs to query/modify
> - Nodes according to given label
> - Labels according to given hostname
> - Add/remove labels
> - Set labels of nodes in the cluster
> - Persist/recover changes of labels/labels-on-nodes to/from storage
> And it has two implementations to store modifications
> - Memory based storage: It will not persist changes, so all labels will be 
> lost when RM restart
> - FileSystem based storage: It will persist/recover to/from FileSystem (like 
> HDFS), and all labels and labels-on-nodes will be recovered upon RM restart

This message was sent by Atlassian JIRA

Reply via email to