[ https://issues.apache.org/jira/browse/YARN-3431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14482328#comment-14482328 ]
Zhijie Shen commented on YARN-3431: ----------------------------------- bq. Are those endpoints just placeholders so that we can specialize each of them? Or else, I'm not sure about the motivation behind this (currently no description for this JIRA...). Could you please elaborate a little bit more on this? The problem is that we have TimelineEntity and the all the sub classes of it. On the other side, we have a single endpoint, which consume TimelineEntity. Therefore, this endpoint will check the incoming request body contains exactly TimelineEntity object. The json data which is serialized from sub-class object seems not to be treated as an TimelineEntity object, and won't be deserialized into the corresponding Sub-class object. I tried to figure out if JAX-RS has the general approach, but didn't have the answer (please let me know if anyone has the idea). Alternatively, I choose treat the predefined sub classes as the sub resources, and put them on separate endpoints. Once deserialized at the server side, java can identify TimelineEntity objects' classes and then treat them accordingly. So we don't need separate Java APIs in the collector. > Sub resources of timeline entity needs to be passed to a separate endpoint. > --------------------------------------------------------------------------- > > Key: YARN-3431 > URL: https://issues.apache.org/jira/browse/YARN-3431 > Project: Hadoop YARN > Issue Type: Sub-task > Components: timelineserver > Reporter: Zhijie Shen > Assignee: Zhijie Shen > Attachments: YARN-3431.1.patch, YARN-3431.2.patch > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)