Vinod Kumar Vavilapalli commented on YARN-2505:

bq.  Thanks for update. However, I just compared two patches, it seems the new 
one is double-sized of the old one.
Yes. Many changes are triplicated. For e.g. 

Some suggestions for renames
 - LabelInfo -> NodeLabelInfo. Similarly the web-service response tags in XML 
and Json.
 - LabelNamesInfo -> ClusterNodeLabelsInfo. Similarly labelNamesInfo -> 
 - Not sure what LabelsInfo is useful fo
 - NodeInfo.labels -> nodeLabels. Similarly the getter.


h3. APIs
Here's a modified proposal for the APIs, given
 - all the renames we have done in other patches
 - existing APIs like /nodes/<nodeID>

h4. Cluster Node-labels APIs
||Request||API||JSON Response||Authorization|
|List cluster node-labels|GET /cluster-node-labels/|[X, Y, Z]|All users|
|Create new cluster node-labels|PUT /cluster-node-labels/<comma-separated list 
of labels> (We can also replace this with or additionally support a POST with 
an array as the body)|{}|Admins|
|Remove some cluster-node-labels|DELETE /cluster-node-labels/<comma-separated 
list of labels>|{}|Admins|

h4. APIs for node-to-label mappings
||Request||API||JSON Response||Authorization|
|List all labels for a node|GET /nodes/<nodeId>/node-labels|[X, Y, Z]|All users|
|Add a bunch of node-label to a node|PUT 
/nodes/<nodeId>/node-labels/<comma-separated list of labels> (We can also 
replace this with or additionally support a post with an array as the 
|Remove a label from a node|DELETE /nodes/<nodeId>/node-labels/<comma-separated 
list of labels>|{}|Admins|

The queue API is missing overall from RMWeb-services - this is not RESTified 
yet. We can track that in its own JIRA. There are more APIs that are 
good-to-have and that I think should be added separately.

What do you think, [~leftnoteasy]/[~ksumit]/[~cwelch]? 

> Support get/add/remove/change labels in RM REST API
> ---------------------------------------------------
>                 Key: YARN-2505
>                 URL: https://issues.apache.org/jira/browse/YARN-2505
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Wangda Tan
>            Assignee: Craig Welch
>         Attachments: YARN-2505.1.patch, YARN-2505.patch

This message was sent by Atlassian JIRA

Reply via email to