[
https://issues.apache.org/jira/browse/YARN-2505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14195460#comment-14195460
]
Wangda Tan commented on YARN-2505:
----------------------------------
bq. -re 1 and 2, there are two kinds of consistency in play here - with the
other node label apis and also with current apis in the web service. There are
quite a few artifacts in the dao which are working with ids, including node,
and they don't use "id" to specify it - I think it's assumed as there's no
other way to refer to them in a web service context except via id. So, to stay
consistent with the other web service apis, I don't think we should add "id" to
the dao names.
I think I was wrong above, what you have is considering the string passed-in is
nodeId, you will try to create a nodeId from that, that is what I expected. And
yes, it is consistent with other methods of web service.
And another thing I can see is, you used ConverterUtils.toNodeId(..) which can
only accept patterns like "host:port". I think we should also support user
specify host only without port. Even though we assume port=0 is the whole host,
but if user doesn't specify the port, we should treat it as port=0 instead of
fail it.
And also, I will prefer to return host only when we want to return NodeId to
user but the port=0. The port=0 magic is more like a implementation detail, we
should avoid to expose it to user as we can.
Does this make sense to you?
Thanks,
Wangda
> 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.11.patch,
> YARN-2505.12.patch, YARN-2505.13.patch, YARN-2505.14.patch,
> YARN-2505.3.patch, YARN-2505.4.patch, YARN-2505.5.patch, YARN-2505.6.patch,
> YARN-2505.7.patch, YARN-2505.8.patch, YARN-2505.9.patch, YARN-2505.9.patch,
> YARN-2505.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)