Sumit Kumar commented on YARN-2505:

Would this be better REST api?
* list all labels
** GET /labels/all
* list all labels for a node
** GET /labels/all?node=<node>
* list all nodes matching a list of labels
** GET /nodes?labels=<list_of_labels>
* create new labels
** POST /labels (takes labels=<list_of_labels> as parameter)
* remove labels
** DELETE /labels (takes labels=<list_of_labels> as parameter)
* assign a label to list of nodes
** PUT /label/<label> (takes nodes=<list_of_nodes> and action=add as parameters)
* remove a label from list of nodes
** PUT /label/<label> (takes nodes=<list_of_nodes> as parameter and 

Since these labels are free form user inputs and will be evaluated for 
expression, you would want to ensure validation against any sort of XSS 
vlunerability. Looking at the patch, functionality is missing to remove nodes 
from a particular label.

> 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