You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Zhijie Shen (JIRA)" <ji...@apache.org> on 2015/02/06 02:13:35 UTC

[jira] [Commented] (YARN-2423) TimelineClient should wrap all GET APIs to facilitate Java users

    [ https://issues.apache.org/jira/browse/YARN-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14308396#comment-14308396 ] 

Zhijie Shen commented on YARN-2423:
-----------------------------------

Thanks for the patch, Robert! Overall, it seems to be on the right rack. Here're some initial comments. Will read more about the patch.

1. IMHO, we may not want to expose the internal data structure {{NameValuePair}}. See how the filters are in {{TimelineEntity}}. NameValuePair -> (String key, Object value) and Collectioin<NameValuePair> -> Map<String, Set<Object>>?
{code}
NameValuePair primaryFilter, Collection<NameValuePair> secondaryFilters,
{code}

2. At the point of view of the client, we actually not need to be so specific about the collection type, such as {{SortedSet<String> entityIds}}. Maybe we can be as general as Collection, or List/Set that is consistent with other collection interfaces used in the client lib. The collection will be serialized before sending to the server, and then deserialized to the suitable collection again.

3. Can we refactor doGettingJson and doPosting to reuse the code?



> TimelineClient should wrap all GET APIs to facilitate Java users
> ----------------------------------------------------------------
>
>                 Key: YARN-2423
>                 URL: https://issues.apache.org/jira/browse/YARN-2423
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Zhijie Shen
>            Assignee: Robert Kanter
>         Attachments: YARN-2423.004.patch, YARN-2423.005.patch, YARN-2423.006.patch, YARN-2423.patch, YARN-2423.patch, YARN-2423.patch
>
>
> TimelineClient provides the Java method to put timeline entities. It's also good to wrap over all GET APIs (both entity and domain), and deserialize the json response into Java POJO objects.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)