Wangda Tan commented on YARN-3521:

Thanks for updating, I have a offline sync with Vinod about using object or 
string in API, some suggestions:
- addToClusterNodeLabel should be object, (you've done this in your patch)
- getLabelsOnNode, getNodeToLabels, getLabelsToNodes should use object, this 
will make user can easily understand attributes of labels on nodes without 
calling getClusterNodeLabels. (You have done some of them, but getLabelsToNodes 
should be updated as well)
- replace/remove should use list of label name only, label name is unique key 
of node labels, using NodeLabelInfo object here is unnecessary.
- I found in your patch, when calling getNodeToLabels, it returns NodeLabelInfo 
with default attributes, we can fix this in separated patch (we need make 
changes to NodeLabelsManager too)
- RPC API should be consistent with this, should be addressed in a separated 

I'm fine with dropping NodeLabelNames as well, if it can keep the REST returned 
structure clean :).

> Support return structured NodeLabel objects in REST API when call 
> getClusterNodeLabels
> --------------------------------------------------------------------------------------
>                 Key: YARN-3521
>                 URL: https://issues.apache.org/jira/browse/YARN-3521
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: api, client, resourcemanager
>            Reporter: Wangda Tan
>            Assignee: Sunil G
>         Attachments: 0001-YARN-3521.patch, 0002-YARN-3521.patch, 
> 0003-YARN-3521.patch, 0004-YARN-3521.patch
> In YARN-3413, yarn cluster CLI returns NodeLabel instead of String, we should 
> make the same change in REST API side to make them consistency.

This message was sent by Atlassian JIRA

Reply via email to