Vinod Kumar Vavilapalli commented on YARN-2494:

Still reading up the comments and the latest patch. But some quick replies

bq. Because we need yarn-client access this too (edit labels in storage 
directly when RM is offline), so I put these code to common dependency between 
yarn-client and yarn-server-resourcemanager.
Once you have the store abstraction, this will be less of a problem? Clearly 
NodeLabelsManager is not something that the client needs access to?

bq. I'm not quite agree about this, we can say "remove a known label", but we 
cannoy say "add a known label" – a label being add is unknown actually. And 
IMO, "existing" is very similar to known, if a label is existing in 
NodeLabelManager, that is a "known" label.
What I really want is to convey is that these are just system recognized 
nodelabels as opposed to node-lables that are actually mapped against a node. 
How about {{addToNodeLabelsCollection()}}, 
{{removeFromNodeLabelsCollection()}}, {{addLabelsToNode()}} and 
{{removeLabelsFromNode()}}. The point about {{addToNodeLabelsCollection()}} is 
that it clearly conveys that there is a NodeLabelsCollection - a set of 
node-labels known by the system.

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